mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 17:03:23 +00:00
Rename docker image as asterinas/asterinas
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
99f6765ced
commit
632b1937c5
4
.github/workflows/cargo_check.yml
vendored
4
.github/workflows/cargo_check.yml
vendored
@ -10,9 +10,9 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
container: jinuxdev/jinux:0.2.2
|
||||
container: asterinas/asterinas:0.2.2
|
||||
steps:
|
||||
- run: echo "Running in jinuxdev/jinux:0.2.2"
|
||||
- run: echo "Running in asterinas/asterinas:0.2.2"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
4
.github/workflows/docker_build.yml
vendored
4
.github/workflows/docker_build.yml
vendored
@ -36,6 +36,6 @@ jobs:
|
||||
file: ./tools/docker/Dockerfile.ubuntu22.04
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: jinuxdev/jinux:${{ steps.fetch-versions.outputs.aster_version }}
|
||||
tags: asterinas/asterinas:${{ steps.fetch-versions.outputs.aster_version }}
|
||||
build-args: |
|
||||
"JINUX_RUST_VERSION=${{ steps.fetch-versions.outputs.rust_version }}"
|
||||
"ASTER_RUST_VERSION=${{ steps.fetch-versions.outputs.rust_version }}"
|
||||
|
4
.github/workflows/integration_test.yml
vendored
4
.github/workflows/integration_test.yml
vendored
@ -10,9 +10,9 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
container: jinuxdev/jinux:0.2.2
|
||||
container: asterinas/asterinas:0.2.2
|
||||
steps:
|
||||
- run: echo "Running in jinuxdev/jinux:0.2.2"
|
||||
- run: echo "Running in asterinas/asterinas:0.2.2"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
4
.github/workflows/unit_test.yml
vendored
4
.github/workflows/unit_test.yml
vendored
@ -10,9 +10,9 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
container: jinuxdev/jinux:0.2.2
|
||||
container: asterinas/asterinas:0.2.2
|
||||
steps:
|
||||
- run: echo "Running in jinuxdev/jinux:0.2.2"
|
||||
- run: echo "Running in asterinas/asterinas:0.2.2"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -34,12 +34,12 @@ git clone [repository url]
|
||||
|
||||
2. After downloading the source code, run the following command to pull the development image.
|
||||
```bash
|
||||
docker pull jinuxdev/jinux:0.2.2
|
||||
docker pull asterinas/asterinas:0.2.2
|
||||
```
|
||||
|
||||
3. Start the development container.
|
||||
```bash
|
||||
docker run -it --privileged --network=host --device=/dev/kvm -v `pwd`:/root/asterinas jinuxdev/jinux:0.2.2
|
||||
docker run -it --privileged --network=host --device=/dev/kvm -v `pwd`:/root/asterinas asterinas/asterinas:0.2.2
|
||||
```
|
||||
|
||||
**All build and test commands should be run inside the development container.**
|
||||
|
@ -3,8 +3,8 @@ TESTS ?= open_test read_test statfs_test chmod_test pty_test uidgid_test vdso_cl
|
||||
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
CUR_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
|
||||
BUILD_DIR ?= $(CUR_DIR)/../build
|
||||
ifdef JINUX_PREBUILT_SYSCALL_TEST
|
||||
BIN_DIR := $(JINUX_PREBUILT_SYSCALL_TEST)
|
||||
ifdef ASTER_PREBUILT_SYSCALL_TEST
|
||||
BIN_DIR := $(ASTER_PREBUILT_SYSCALL_TEST)
|
||||
else
|
||||
BIN_DIR := $(BUILD_DIR)/syscall_test_bins
|
||||
SRC_DIR := $(BUILD_DIR)/gvisor_src
|
||||
@ -21,7 +21,7 @@ all: $(TESTS)
|
||||
$(TESTS): $(BIN_DIR) $(TARGET_DIR)
|
||||
@cp -f $</$@ $(TARGET_DIR)/tests
|
||||
|
||||
ifndef JINUX_PREBUILT_SYSCALL_TEST
|
||||
ifndef ASTER_PREBUILT_SYSCALL_TEST
|
||||
$(BIN_DIR): $(SRC_DIR)
|
||||
@if ! type bazel > /dev/null; then \
|
||||
echo "bazel is not installed, please run $(CUR_DIR)/install_bazel.sh with sudo permission to install it."; \
|
||||
|
@ -7,7 +7,7 @@
|
||||
set timeout_style=#GRUB_TIMEOUT_STYLE#
|
||||
set timeout=#GRUB_TIMEOUT#
|
||||
|
||||
menuentry 'jinux' {
|
||||
menuentry 'asterinas' {
|
||||
#GRUB_CMD_KERNEL# #KERNEL# #KERNEL_COMMAND_LINE#
|
||||
#GRUB_CMD_INITRAMFS# /boot/initramfs.cpio.gz
|
||||
boot
|
||||
|
@ -21,7 +21,7 @@ pub fn run_gdb_client(path: &PathBuf, gdb_grub: bool) {
|
||||
let mut gdb_cmd = Command::new("gdb");
|
||||
// Set the architecture, otherwise GDB will complain about.
|
||||
gdb_cmd.arg("-ex").arg("set arch i386:x86-64:intel");
|
||||
let grub_script = "/tmp/jinux-gdb-grub-script";
|
||||
let grub_script = "/tmp/aster-gdb-grub-script";
|
||||
if gdb_grub {
|
||||
let grub_dir = PathBuf::from(qemu_grub_efi::GRUB_PREFIX)
|
||||
.join("lib")
|
||||
@ -41,7 +41,7 @@ pub fn run_gdb_client(path: &PathBuf, gdb_grub: bool) {
|
||||
for line in lines {
|
||||
if line.contains("target remote :1234") {
|
||||
// Connect to the GDB server.
|
||||
writeln!(f, "target remote /tmp/jinux-gdb-socket").unwrap();
|
||||
writeln!(f, "target remote /tmp/aster-gdb-socket").unwrap();
|
||||
} else {
|
||||
writeln!(f, "{}", line).unwrap();
|
||||
}
|
||||
@ -53,7 +53,7 @@ pub fn run_gdb_client(path: &PathBuf, gdb_grub: bool) {
|
||||
// Connect to the GDB server.
|
||||
gdb_cmd
|
||||
.arg("-ex")
|
||||
.arg("target remote /tmp/jinux-gdb-socket");
|
||||
.arg("target remote /tmp/aster-gdb-socket");
|
||||
}
|
||||
// Connect to the GDB server and run.
|
||||
println!("running:{:#?}", gdb_cmd);
|
||||
|
@ -9,10 +9,10 @@ update_cargo_versions() {
|
||||
sed -i "s/^version = \"[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\"$/version = \"${new_version}\"/g" $1
|
||||
}
|
||||
|
||||
# Update Docker image versions (`jinuxdev/jinux:{version}`) in file $1
|
||||
# Update Docker image versions (`asterinas/asterinas:{version}`) in file $1
|
||||
update_image_versions() {
|
||||
echo "Updating file $1"
|
||||
sed -i "s/jinuxdev\/jinux:[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/jinuxdev\/jinux:${new_version}/g" $1
|
||||
sed -i "s/asterinas\/asterinas:[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/asterinas\/asterinas:${new_version}/g" $1
|
||||
}
|
||||
|
||||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
@ -182,15 +182,15 @@ RUN make defconfig \
|
||||
&& sed -i "s/# CONFIG_FEATURE_SH_STANDALONE is not set/CONFIG_FEATURE_SH_STANDALONE=y/g" .config \
|
||||
&& make -j
|
||||
|
||||
#= The final stages to produce the Jinux development image ====================
|
||||
#= The final stages to produce the Asterinas development image ====================
|
||||
|
||||
FROM build-base as rust
|
||||
|
||||
# Install Rust
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
ARG JINUX_RUST_VERSION
|
||||
ARG ASTER_RUST_VERSION
|
||||
RUN curl https://sh.rustup.rs -sSf | \
|
||||
sh -s -- --default-toolchain ${JINUX_RUST_VERSION} -y \
|
||||
sh -s -- --default-toolchain ${ASTER_RUST_VERSION} -y \
|
||||
&& rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git \
|
||||
&& cargo -V \
|
||||
&& rustup component add rust-src rustc-dev llvm-tools-preview
|
||||
@ -202,7 +202,7 @@ RUN cargo install \
|
||||
|
||||
FROM rust
|
||||
|
||||
# Install all Jinux dependent packages
|
||||
# Install all Asterinas dependent packages
|
||||
RUN apt update && apt-get install -y --no-install-recommends \
|
||||
cpio \
|
||||
cpuid \
|
||||
@ -226,7 +226,7 @@ RUN apt clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Prepare the system call test suite
|
||||
COPY --from=syscall_test /root/syscall_test/build/syscall_test_bins /root/syscall_test_bins
|
||||
ENV JINUX_PREBUILT_SYSCALL_TEST=/root/syscall_test_bins
|
||||
ENV ASTER_PREBUILT_SYSCALL_TEST=/root/syscall_test_bins
|
||||
|
||||
# Install QEMU built from the previous stages
|
||||
COPY --from=qemu /usr/local/qemu /usr/local/qemu
|
||||
@ -249,9 +249,9 @@ COPY --from=busybox /root/busybox/busybox /bin/busybox
|
||||
# Install benchmarks built from the previous stages
|
||||
COPY --from=build-benchmarks /usr/local/benchmark /usr/local/benchmark
|
||||
|
||||
# Add the path of jinux tools
|
||||
ENV PATH="/root/jinux/target/bin:${PATH}"
|
||||
# Add the path of Asterinas tools
|
||||
ENV PATH="/root/asterinas/target/bin:${PATH}"
|
||||
|
||||
VOLUME [ "/root/jinux" ]
|
||||
VOLUME [ "/root/asterinas" ]
|
||||
|
||||
WORKDIR /root/jinux
|
||||
WORKDIR /root/asterinas
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Asterinas Development Docker Images
|
||||
|
||||
Asterinas development Docker images are provided to facilitate developing and testing Asterinas project. These images can be found in the [jinuxdev/jinux](https://hub.docker.com/r/jinuxdev/jinux/) repository on DockerHub.
|
||||
Asterinas development Docker images are provided to facilitate developing and testing Asterinas project. These images can be found in the [asterinas/asterinas](https://hub.docker.com/r/asterinas/asterinas/) repository on DockerHub.
|
||||
|
||||
## Building Docker Images
|
||||
|
||||
@ -9,8 +9,8 @@ To build a Docker image for Asterinas and test it on your local machine, navigat
|
||||
```bash
|
||||
docker buildx build \
|
||||
-f tools/docker/Dockerfile.ubuntu22.04 \
|
||||
--build-arg JINUX_RUST_VERSION=$RUST_VERSION \
|
||||
-t jinuxdev/jinux:$ASTER_VERSION \
|
||||
--build-arg ASTER_RUST_VERSION=$RUST_VERSION \
|
||||
-t asterinas/asterinas:$ASTER_VERSION \
|
||||
.
|
||||
```
|
||||
|
||||
|
@ -6,6 +6,6 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
ASTER_SRC_DIR=${SCRIPT_DIR}/../..
|
||||
CARGO_TOML_PATH=${SCRIPT_DIR}/../../Cargo.toml
|
||||
VERSION=$( cat ${ASTER_SRC_DIR}/VERSION )
|
||||
IMAGE_NAME=jinuxdev/jinux:${VERSION}
|
||||
IMAGE_NAME=asterinas/asterinas:${VERSION}
|
||||
|
||||
docker run -it --privileged --network=host --device=/dev/kvm -v ${ASTER_SRC_DIR}:/root/asterinas ${IMAGE_NAME}
|
||||
|
Reference in New Issue
Block a user