From 9645b2c3216432f39f79328088e562abf8339d51 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 2 Aug 2023 17:31:31 +0900 Subject: [PATCH] docs: update docker docs --- .github/workflows/docker_build_push.yml | 3 +++ README.md | 4 +++- TODO.md | 2 +- docker/README.md | 19 +++++++++++++++++++ docker/docker-compose.slim.yml | 20 ++++++++++---------- docker/docker-compose.yml | 20 ++++++++++---------- 6 files changed, 46 insertions(+), 22 deletions(-) create mode 100644 docker/README.md diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml index a3930c8..71d67ad 100644 --- a/.github/workflows/docker_build_push.yml +++ b/.github/workflows/docker_build_push.yml @@ -41,6 +41,9 @@ jobs: "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" platforms: linux/amd64,linux/arm64 tags-suffix: "-s2n" + # Aliases must be used only for release builds + aliases: | + "s2n" steps: - name: Checkout diff --git a/README.md b/README.md index 074f91e..f14668d 100644 --- a/README.md +++ b/README.md @@ -236,7 +236,9 @@ Since it is currently a work-in-progress project, we are frequently adding new o ## Using Docker Image -You can also use [docker image](https://hub.docker.com/r/jqtype/rpxy) instead of directly executing the binary. There are only several docker-specific environment variables. +You can also use `docker` image hosted on [Docker Hub](https://hub.docker.com/r/jqtype/rpxy) and [GitHub Container Registry](https://github.com/junkurihara/rust-rpxy/pkgs/container/rust-rpxy) instead of directly executing the binary. See [`./docker/README.md`](./docker/README.md) for the differences on image tags. + +There are only several docker-specific environment variables. - `HOST_USER` (default: `user`): User name executing `rpxy` inside the container. - `HOST_UID` (default: `900`): `UID` of `HOST_USER`. diff --git a/TODO.md b/TODO.md index f3d29a5..e93bfcb 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,5 @@ # TODO List -- [Try in v0.5.0] **Use `gchr.io`** - [Try in v0.5.0] **Cache option for the response with `Cache-Control: public` header directive ([#55](https://github.com/junkurihara/rust-rpxy/issues/55))** - Improvement of path matcher - More flexible option for rewriting path @@ -25,6 +24,7 @@ - add option for sticky cookie name - add option for sticky cookie duration +- Done in v0.5.0 ~~**Use `gchr.io`**~~ - Done in v0.5.0: ~~Consideration on migrating from `quinn` and `h3-quinn` to other QUIC implementations ([#57](https://github.com/junkurihara/rust-rpxy/issues/57))~~ - Done in v0.4.0: diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..74344a7 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,19 @@ +# Docker Images of `rpxy` + +The `rpxy` docker images are hosted both on [Docker Hub](https://hub.docker.com/r/jqtype/rpxy) and [GitHub Container Registry](https://github.com/junkurihara/rust-rpxy/pkgs/container/rust-rpxy). Differences among tags are summarized as follows. + +## Latest Builds + +- `latest`: Built from the `main` branch with default features, running on Ubuntu. +- `latest-slim`, `slim`: Built by `musl` from the `main` branch with default features, running on Alpine. +- `latest-s2n`, `s2n`: Built from the `main` branch with the `http3-s2n` feature, running on Ubuntu. + +## Nightly Builds + +- `nightly`: Built from the `develop` branch with default features, running on Ubuntu. +- `nightly-slim`: Built by `musl` from the `develop` branch with default features, running on Alpine. +- `nightly-s2n`: Built from the `develop` branch with the `http3-s2n` feature, running on Ubuntu. + +## Caveats + +Due to some compile errors of `s2n-quic` subpackages with `musl`, `nightly-s2n-slim` or `latest-s2n-slim` are not yet provided. diff --git a/docker/docker-compose.slim.yml b/docker/docker-compose.slim.yml index b147562..9e9f958 100644 --- a/docker/docker-compose.slim.yml +++ b/docker/docker-compose.slim.yml @@ -1,7 +1,7 @@ version: "3" services: rpxy-rp: - image: jqtype/rpxy + image: jqtype/rpxy:slim # ghcr.io/junkurihara/rust-rpxy:slim also works container_name: rpxy init: true restart: unless-stopped @@ -9,15 +9,15 @@ services: - 127.0.0.1:8080:8080/tcp - 127.0.0.1:8443:8443/udp - 127.0.0.1:8443:8443/tcp - build: - context: ../ - additional_contexts: # Uncomment when you build with musl - - messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl - - messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl - dockerfile: ./docker/Dockerfile.slim # based on alpine and build x86_64-unknown-linux-musl - platforms: # Choose your platforms - - "linux/amd64" - # - "linux/arm64" + # build: # Uncomment if you build yourself + # context: ../ + # additional_contexts: + # - messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl + # - messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl + # dockerfile: ./docker/Dockerfile.slim # based on alpine and build x86_64-unknown-linux-musl + # platforms: # Choose your platforms + # - "linux/amd64" + # # - "linux/arm64" environment: - LOG_LEVEL=debug - LOG_TO_FILE=true diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 6d74959..bf56ace 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,7 +1,7 @@ version: "3" services: rpxy-rp: - image: jqtype/rpxy + image: jqtype/rpxy:latest # ghcr.io/junkurihara/rust-rpxy:latest also works container_name: rpxy init: true restart: unless-stopped @@ -9,15 +9,15 @@ services: - 127.0.0.1:8080:8080/tcp - 127.0.0.1:8443:8443/udp - 127.0.0.1:8443:8443/tcp - build: - context: ../ - args: # Uncomment when build quic-s2n version - - "CARGO_FEATURES=--no-default-features --features http3-s2n" - - "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" - dockerfile: ./docker/Dockerfile # based on ubuntu 22.04 and build x86_64-unknown-linux-gnu - platforms: # Choose your platforms - - "linux/amd64" - # - "linux/arm64" + # build: # Uncomment if you build yourself + # context: ../ + # args: # Uncomment when build quic-s2n version + # - "CARGO_FEATURES=--no-default-features --features http3-s2n" + # - "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" + # dockerfile: ./docker/Dockerfile # based on ubuntu 22.04 and build x86_64-unknown-linux-gnu + # platforms: # Choose your platforms + # - "linux/amd64" + # # - "linux/arm64" environment: - LOG_LEVEL=debug - LOG_TO_FILE=true