Rename docker image as asterinas/asterinas

This commit is contained in:
Jianfeng Jiang
2023-12-25 08:01:48 +00:00
committed by Tate, Hongliang Tian
parent 99f6765ced
commit 632b1937c5
12 changed files with 32 additions and 32 deletions

View File

@ -10,9 +10,9 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
container: jinuxdev/jinux:0.2.2 container: asterinas/asterinas:0.2.2
steps: steps:
- run: echo "Running in jinuxdev/jinux:0.2.2" - run: echo "Running in asterinas/asterinas:0.2.2"
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -36,6 +36,6 @@ jobs:
file: ./tools/docker/Dockerfile.ubuntu22.04 file: ./tools/docker/Dockerfile.ubuntu22.04
platforms: linux/amd64 platforms: linux/amd64
push: true push: true
tags: jinuxdev/jinux:${{ steps.fetch-versions.outputs.aster_version }} tags: asterinas/asterinas:${{ steps.fetch-versions.outputs.aster_version }}
build-args: | build-args: |
"JINUX_RUST_VERSION=${{ steps.fetch-versions.outputs.rust_version }}" "ASTER_RUST_VERSION=${{ steps.fetch-versions.outputs.rust_version }}"

View File

@ -10,9 +10,9 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
container: jinuxdev/jinux:0.2.2 container: asterinas/asterinas:0.2.2
steps: steps:
- run: echo "Running in jinuxdev/jinux:0.2.2" - run: echo "Running in asterinas/asterinas:0.2.2"
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -10,9 +10,9 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
container: jinuxdev/jinux:0.2.2 container: asterinas/asterinas:0.2.2
steps: steps:
- run: echo "Running in jinuxdev/jinux:0.2.2" - run: echo "Running in asterinas/asterinas:0.2.2"
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -34,12 +34,12 @@ git clone [repository url]
2. After downloading the source code, run the following command to pull the development image. 2. After downloading the source code, run the following command to pull the development image.
```bash ```bash
docker pull jinuxdev/jinux:0.2.2 docker pull asterinas/asterinas:0.2.2
``` ```
3. Start the development container. 3. Start the development container.
```bash ```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.** **All build and test commands should be run inside the development container.**

View File

@ -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))) MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
CUR_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH))) CUR_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
BUILD_DIR ?= $(CUR_DIR)/../build BUILD_DIR ?= $(CUR_DIR)/../build
ifdef JINUX_PREBUILT_SYSCALL_TEST ifdef ASTER_PREBUILT_SYSCALL_TEST
BIN_DIR := $(JINUX_PREBUILT_SYSCALL_TEST) BIN_DIR := $(ASTER_PREBUILT_SYSCALL_TEST)
else else
BIN_DIR := $(BUILD_DIR)/syscall_test_bins BIN_DIR := $(BUILD_DIR)/syscall_test_bins
SRC_DIR := $(BUILD_DIR)/gvisor_src SRC_DIR := $(BUILD_DIR)/gvisor_src
@ -21,7 +21,7 @@ all: $(TESTS)
$(TESTS): $(BIN_DIR) $(TARGET_DIR) $(TESTS): $(BIN_DIR) $(TARGET_DIR)
@cp -f $</$@ $(TARGET_DIR)/tests @cp -f $</$@ $(TARGET_DIR)/tests
ifndef JINUX_PREBUILT_SYSCALL_TEST ifndef ASTER_PREBUILT_SYSCALL_TEST
$(BIN_DIR): $(SRC_DIR) $(BIN_DIR): $(SRC_DIR)
@if ! type bazel > /dev/null; then \ @if ! type bazel > /dev/null; then \
echo "bazel is not installed, please run $(CUR_DIR)/install_bazel.sh with sudo permission to install it."; \ echo "bazel is not installed, please run $(CUR_DIR)/install_bazel.sh with sudo permission to install it."; \

View File

@ -7,7 +7,7 @@
set timeout_style=#GRUB_TIMEOUT_STYLE# set timeout_style=#GRUB_TIMEOUT_STYLE#
set timeout=#GRUB_TIMEOUT# set timeout=#GRUB_TIMEOUT#
menuentry 'jinux' { menuentry 'asterinas' {
#GRUB_CMD_KERNEL# #KERNEL# #KERNEL_COMMAND_LINE# #GRUB_CMD_KERNEL# #KERNEL# #KERNEL_COMMAND_LINE#
#GRUB_CMD_INITRAMFS# /boot/initramfs.cpio.gz #GRUB_CMD_INITRAMFS# /boot/initramfs.cpio.gz
boot boot

View File

@ -21,7 +21,7 @@ pub fn run_gdb_client(path: &PathBuf, gdb_grub: bool) {
let mut gdb_cmd = Command::new("gdb"); let mut gdb_cmd = Command::new("gdb");
// Set the architecture, otherwise GDB will complain about. // Set the architecture, otherwise GDB will complain about.
gdb_cmd.arg("-ex").arg("set arch i386:x86-64:intel"); 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 { if gdb_grub {
let grub_dir = PathBuf::from(qemu_grub_efi::GRUB_PREFIX) let grub_dir = PathBuf::from(qemu_grub_efi::GRUB_PREFIX)
.join("lib") .join("lib")
@ -41,7 +41,7 @@ pub fn run_gdb_client(path: &PathBuf, gdb_grub: bool) {
for line in lines { for line in lines {
if line.contains("target remote :1234") { if line.contains("target remote :1234") {
// Connect to the GDB server. // Connect to the GDB server.
writeln!(f, "target remote /tmp/jinux-gdb-socket").unwrap(); writeln!(f, "target remote /tmp/aster-gdb-socket").unwrap();
} else { } else {
writeln!(f, "{}", line).unwrap(); writeln!(f, "{}", line).unwrap();
} }
@ -53,7 +53,7 @@ pub fn run_gdb_client(path: &PathBuf, gdb_grub: bool) {
// Connect to the GDB server. // Connect to the GDB server.
gdb_cmd gdb_cmd
.arg("-ex") .arg("-ex")
.arg("target remote /tmp/jinux-gdb-socket"); .arg("target remote /tmp/aster-gdb-socket");
} }
// Connect to the GDB server and run. // Connect to the GDB server and run.
println!("running:{:#?}", gdb_cmd); println!("running:{:#?}", gdb_cmd);

View File

@ -9,10 +9,10 @@ update_cargo_versions() {
sed -i "s/^version = \"[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\"$/version = \"${new_version}\"/g" $1 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() { update_image_versions() {
echo "Updating file $1" 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 ) SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

View File

@ -182,15 +182,15 @@ RUN make defconfig \
&& sed -i "s/# CONFIG_FEATURE_SH_STANDALONE is not set/CONFIG_FEATURE_SH_STANDALONE=y/g" .config \ && sed -i "s/# CONFIG_FEATURE_SH_STANDALONE is not set/CONFIG_FEATURE_SH_STANDALONE=y/g" .config \
&& make -j && 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 FROM build-base as rust
# Install Rust # Install Rust
ENV PATH="/root/.cargo/bin:${PATH}" ENV PATH="/root/.cargo/bin:${PATH}"
ARG JINUX_RUST_VERSION ARG ASTER_RUST_VERSION
RUN curl https://sh.rustup.rs -sSf | \ 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 \ && rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git \
&& cargo -V \ && cargo -V \
&& rustup component add rust-src rustc-dev llvm-tools-preview && rustup component add rust-src rustc-dev llvm-tools-preview
@ -202,7 +202,7 @@ RUN cargo install \
FROM rust FROM rust
# Install all Jinux dependent packages # Install all Asterinas dependent packages
RUN apt update && apt-get install -y --no-install-recommends \ RUN apt update && apt-get install -y --no-install-recommends \
cpio \ cpio \
cpuid \ cpuid \
@ -226,7 +226,7 @@ RUN apt clean && rm -rf /var/lib/apt/lists/*
# Prepare the system call test suite # Prepare the system call test suite
COPY --from=syscall_test /root/syscall_test/build/syscall_test_bins /root/syscall_test_bins 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 # Install QEMU built from the previous stages
COPY --from=qemu /usr/local/qemu /usr/local/qemu 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 # Install benchmarks built from the previous stages
COPY --from=build-benchmarks /usr/local/benchmark /usr/local/benchmark COPY --from=build-benchmarks /usr/local/benchmark /usr/local/benchmark
# Add the path of jinux tools # Add the path of Asterinas tools
ENV PATH="/root/jinux/target/bin:${PATH}" ENV PATH="/root/asterinas/target/bin:${PATH}"
VOLUME [ "/root/jinux" ] VOLUME [ "/root/asterinas" ]
WORKDIR /root/jinux WORKDIR /root/asterinas

View File

@ -1,6 +1,6 @@
# Asterinas Development Docker Images # 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 ## Building Docker Images
@ -9,8 +9,8 @@ To build a Docker image for Asterinas and test it on your local machine, navigat
```bash ```bash
docker buildx build \ docker buildx build \
-f tools/docker/Dockerfile.ubuntu22.04 \ -f tools/docker/Dockerfile.ubuntu22.04 \
--build-arg JINUX_RUST_VERSION=$RUST_VERSION \ --build-arg ASTER_RUST_VERSION=$RUST_VERSION \
-t jinuxdev/jinux:$ASTER_VERSION \ -t asterinas/asterinas:$ASTER_VERSION \
. .
``` ```

View File

@ -6,6 +6,6 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
ASTER_SRC_DIR=${SCRIPT_DIR}/../.. ASTER_SRC_DIR=${SCRIPT_DIR}/../..
CARGO_TOML_PATH=${SCRIPT_DIR}/../../Cargo.toml CARGO_TOML_PATH=${SCRIPT_DIR}/../../Cargo.toml
VERSION=$( cat ${ASTER_SRC_DIR}/VERSION ) 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} docker run -it --privileged --network=host --device=/dev/kvm -v ${ASTER_SRC_DIR}:/root/asterinas ${IMAGE_NAME}