asterinas/tools/docker/README.md

26 lines
1.2 KiB
Markdown
Raw Normal View History

# Asterinas Development Docker Images
2023-08-11 07:58:22 +00:00
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.
2023-08-11 07:58:22 +00:00
## Building Docker Images
Asterinas development Docker image is based on an OSDK development Docker image. To build an Asterinas development Docker image and test it on your local machine, navigate to the root directory of the Asterinas source code tree and execute the following command:
2023-08-11 07:58:22 +00:00
```bash
2024-05-08 07:58:56 +00:00
cd <asterinas dir>
# Build Docker image
2023-08-11 07:58:22 +00:00
docker buildx build \
2024-05-08 07:58:56 +00:00
-f tools/docker/Dockerfile \
--build-arg ASTER_RUST_VERSION=$(grep "channel" rust-toolchain.toml | awk -F '"' '{print $2}') \
--build-arg BASE_VERSION=$(cat DOCKER_IMAGE_VERSION) \
-t asterinas/asterinas:$(cat DOCKER_IMAGE_VERSION) \
2023-08-11 07:58:22 +00:00
.
```
## Tagging and Uploading Docker Images
2023-08-11 07:58:22 +00:00
The Docker images are tagged according to the version specified
in the `DOCKER_IMAGE_VERSION` file at the project root.
Check out the [version bump](https://asterinas.github.io/book/to-contribute/version-bump.html) documentation
on how new versions of the Docker images are released.