diff options
author | BlackDex <[email protected]> | 2022-02-07 22:26:22 +0100 |
---|---|---|
committer | BlackDex <[email protected]> | 2022-02-22 20:00:33 +0100 |
commit | 5f01db69ffdb3d37e24e30a7003792ed72882973 (patch) | |
tree | f654270cf648c01c2b4ac020f1bdfcce2a9e1064 /docker | |
parent | d781981bbdbe78ef34850b5b3359e38b714d29de (diff) | |
download | vaultwarden-5f01db69ffdb3d37e24e30a7003792ed72882973.tar.gz vaultwarden-5f01db69ffdb3d37e24e30a7003792ed72882973.zip |
Update async to prepare for main merge
- Changed nightly to stable in Dockerfile and Workflow
- Updated Dockerfile to use stable and updated ENV's
- Removed 0.0.0.0 as default addr it now uses ROCKET_ADDRESS or the default
- Updated Github Workflow actions to the latest versions
- Updated Hadolint version
- Re-orderd the Cargo.toml file a bit and put libs together which are linked
- Updated some libs
- Updated .dockerignore file
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile.buildx | 1 | ||||
-rw-r--r-- | docker/Dockerfile.j2 | 14 | ||||
-rw-r--r-- | docker/amd64/Dockerfile | 6 | ||||
-rw-r--r-- | docker/amd64/Dockerfile.alpine | 6 | ||||
-rw-r--r-- | docker/amd64/Dockerfile.buildx | 6 | ||||
-rw-r--r-- | docker/amd64/Dockerfile.buildx.alpine | 6 | ||||
-rw-r--r-- | docker/arm64/Dockerfile | 6 | ||||
-rw-r--r-- | docker/arm64/Dockerfile.alpine | 6 | ||||
-rw-r--r-- | docker/arm64/Dockerfile.buildx | 6 | ||||
-rw-r--r-- | docker/arm64/Dockerfile.buildx.alpine | 6 | ||||
-rw-r--r-- | docker/armv6/Dockerfile | 6 | ||||
-rw-r--r-- | docker/armv6/Dockerfile.alpine | 6 | ||||
-rw-r--r-- | docker/armv6/Dockerfile.buildx | 6 | ||||
-rw-r--r-- | docker/armv6/Dockerfile.buildx.alpine | 6 | ||||
-rw-r--r-- | docker/armv7/Dockerfile | 6 | ||||
-rw-r--r-- | docker/armv7/Dockerfile.alpine | 6 | ||||
-rw-r--r-- | docker/armv7/Dockerfile.buildx | 6 | ||||
-rw-r--r-- | docker/armv7/Dockerfile.buildx.alpine | 6 |
18 files changed, 56 insertions, 55 deletions
diff --git a/docker/Dockerfile.buildx b/docker/Dockerfile.buildx index ed0d23b3..c250312c 100644 --- a/docker/Dockerfile.buildx +++ b/docker/Dockerfile.buildx @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 # The cross-built images have the build arch (`amd64`) embedded in the image # manifest, rather than the target arch. For example: # diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2 index 2cffc647..196af08d 100644 --- a/docker/Dockerfile.j2 +++ b/docker/Dockerfile.j2 @@ -6,19 +6,19 @@ {% set build_stage_base_image = "rust:1.58-buster" %} {% if "alpine" in target_file %} {% if "amd64" in target_file %} -{% set build_stage_base_image = "blackdex/rust-musl:x86_64-musl-nightly-2022-01-23" %} +{% set build_stage_base_image = "blackdex/rust-musl:x86_64-musl-stable" %} {% set runtime_stage_base_image = "alpine:3.15" %} {% set package_arch_target = "x86_64-unknown-linux-musl" %} {% elif "armv7" in target_file %} -{% set build_stage_base_image = "blackdex/rust-musl:armv7-musleabihf-nightly-2022-01-23" %} +{% set build_stage_base_image = "blackdex/rust-musl:armv7-musleabihf-stable" %} {% set runtime_stage_base_image = "balenalib/armv7hf-alpine:3.15" %} {% set package_arch_target = "armv7-unknown-linux-musleabihf" %} {% elif "armv6" in target_file %} -{% set build_stage_base_image = "blackdex/rust-musl:arm-musleabi-nightly-2022-01-23" %} +{% set build_stage_base_image = "blackdex/rust-musl:arm-musleabi-stable" %} {% set runtime_stage_base_image = "balenalib/rpi-alpine:3.15" %} {% set package_arch_target = "arm-unknown-linux-musleabi" %} {% elif "arm64" in target_file %} -{% set build_stage_base_image = "blackdex/rust-musl:aarch64-musl-nightly-2022-01-23" %} +{% set build_stage_base_image = "blackdex/rust-musl:aarch64-musl-stable" %} {% set runtime_stage_base_image = "balenalib/aarch64-alpine:3.15" %} {% set package_arch_target = "aarch64-unknown-linux-musl" %} {% endif %} @@ -194,9 +194,9 @@ RUN musl-strip target/{{ package_arch_target }}/release/vaultwarden # because we already have a binary built FROM {{ runtime_stage_base_image }} -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 {%- if "alpine" in runtime_stage_base_image %} \ SSL_CERT_DIR=/etc/ssl/certs {% endif %} diff --git a/docker/amd64/Dockerfile b/docker/amd64/Dockerfile index 3af0f411..c588c8e9 100644 --- a/docker/amd64/Dockerfile +++ b/docker/amd64/Dockerfile @@ -89,9 +89,9 @@ RUN cargo build --features ${DB} --release # because we already have a binary built FROM debian:buster-slim -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 # Create data folder and Install needed libraries diff --git a/docker/amd64/Dockerfile.alpine b/docker/amd64/Dockerfile.alpine index 189f50e6..9266da29 100644 --- a/docker/amd64/Dockerfile.alpine +++ b/docker/amd64/Dockerfile.alpine @@ -27,7 +27,7 @@ FROM vaultwarden/web-vault@sha256:9b82318d553d72f091e8755f5aff80eed495f90bbe5b0703522953480f5c2fba as vault ########################## BUILD IMAGE ########################## -FROM blackdex/rust-musl:x86_64-musl-nightly-2022-01-23 as build +FROM blackdex/rust-musl:x86_64-musl-stable as build @@ -83,9 +83,9 @@ RUN cargo build --features ${DB} --release --target=x86_64-unknown-linux-musl # because we already have a binary built FROM alpine:3.15 -ENV ROCKET_ENV="staging" \ +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ ROCKET_PORT=80 \ - ROCKET_WORKERS=10 \ SSL_CERT_DIR=/etc/ssl/certs diff --git a/docker/amd64/Dockerfile.buildx b/docker/amd64/Dockerfile.buildx index 05b6b71d..aa61d037 100644 --- a/docker/amd64/Dockerfile.buildx +++ b/docker/amd64/Dockerfile.buildx @@ -89,9 +89,9 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/. # because we already have a binary built FROM debian:buster-slim -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 # Create data folder and Install needed libraries diff --git a/docker/amd64/Dockerfile.buildx.alpine b/docker/amd64/Dockerfile.buildx.alpine index 066b8fe1..e0afd4fd 100644 --- a/docker/amd64/Dockerfile.buildx.alpine +++ b/docker/amd64/Dockerfile.buildx.alpine @@ -27,7 +27,7 @@ FROM vaultwarden/web-vault@sha256:9b82318d553d72f091e8755f5aff80eed495f90bbe5b0703522953480f5c2fba as vault ########################## BUILD IMAGE ########################## -FROM blackdex/rust-musl:x86_64-musl-nightly-2022-01-23 as build +FROM blackdex/rust-musl:x86_64-musl-stable as build @@ -83,9 +83,9 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/. # because we already have a binary built FROM alpine:3.15 -ENV ROCKET_ENV="staging" \ +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ ROCKET_PORT=80 \ - ROCKET_WORKERS=10 \ SSL_CERT_DIR=/etc/ssl/certs diff --git a/docker/arm64/Dockerfile b/docker/arm64/Dockerfile index d3a32dc4..40bfccc5 100644 --- a/docker/arm64/Dockerfile +++ b/docker/arm64/Dockerfile @@ -109,9 +109,9 @@ RUN cargo build --features ${DB} --release --target=aarch64-unknown-linux-gnu # because we already have a binary built FROM balenalib/aarch64-debian:buster -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 # hadolint ignore=DL3059 RUN [ "cross-build-start" ] diff --git a/docker/arm64/Dockerfile.alpine b/docker/arm64/Dockerfile.alpine index 6890d7bf..b233ac1b 100644 --- a/docker/arm64/Dockerfile.alpine +++ b/docker/arm64/Dockerfile.alpine @@ -27,7 +27,7 @@ FROM vaultwarden/web-vault@sha256:9b82318d553d72f091e8755f5aff80eed495f90bbe5b0703522953480f5c2fba as vault ########################## BUILD IMAGE ########################## -FROM blackdex/rust-musl:aarch64-musl-nightly-2022-01-23 as build +FROM blackdex/rust-musl:aarch64-musl-stable as build @@ -83,9 +83,9 @@ RUN cargo build --features ${DB} --release --target=aarch64-unknown-linux-musl # because we already have a binary built FROM balenalib/aarch64-alpine:3.15 -ENV ROCKET_ENV="staging" \ +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ ROCKET_PORT=80 \ - ROCKET_WORKERS=10 \ SSL_CERT_DIR=/etc/ssl/certs diff --git a/docker/arm64/Dockerfile.buildx b/docker/arm64/Dockerfile.buildx index b93cd90e..27b97333 100644 --- a/docker/arm64/Dockerfile.buildx +++ b/docker/arm64/Dockerfile.buildx @@ -109,9 +109,9 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/. # because we already have a binary built FROM balenalib/aarch64-debian:buster -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 # hadolint ignore=DL3059 RUN [ "cross-build-start" ] diff --git a/docker/arm64/Dockerfile.buildx.alpine b/docker/arm64/Dockerfile.buildx.alpine index dd4107c6..521fbd8f 100644 --- a/docker/arm64/Dockerfile.buildx.alpine +++ b/docker/arm64/Dockerfile.buildx.alpine @@ -27,7 +27,7 @@ FROM vaultwarden/web-vault@sha256:9b82318d553d72f091e8755f5aff80eed495f90bbe5b0703522953480f5c2fba as vault ########################## BUILD IMAGE ########################## -FROM blackdex/rust-musl:aarch64-musl-nightly-2022-01-23 as build +FROM blackdex/rust-musl:aarch64-musl-stable as build @@ -83,9 +83,9 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/. # because we already have a binary built FROM balenalib/aarch64-alpine:3.15 -ENV ROCKET_ENV="staging" \ +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ ROCKET_PORT=80 \ - ROCKET_WORKERS=10 \ SSL_CERT_DIR=/etc/ssl/certs diff --git a/docker/armv6/Dockerfile b/docker/armv6/Dockerfile index e9e6d4bb..8cf59c4e 100644 --- a/docker/armv6/Dockerfile +++ b/docker/armv6/Dockerfile @@ -109,9 +109,9 @@ RUN cargo build --features ${DB} --release --target=arm-unknown-linux-gnueabi # because we already have a binary built FROM balenalib/rpi-debian:buster -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 # hadolint ignore=DL3059 RUN [ "cross-build-start" ] diff --git a/docker/armv6/Dockerfile.alpine b/docker/armv6/Dockerfile.alpine index 19f7f936..bdfdc612 100644 --- a/docker/armv6/Dockerfile.alpine +++ b/docker/armv6/Dockerfile.alpine @@ -27,7 +27,7 @@ FROM vaultwarden/web-vault@sha256:9b82318d553d72f091e8755f5aff80eed495f90bbe5b0703522953480f5c2fba as vault ########################## BUILD IMAGE ########################## -FROM blackdex/rust-musl:arm-musleabi-nightly-2022-01-23 as build +FROM blackdex/rust-musl:arm-musleabi-stable as build @@ -83,9 +83,9 @@ RUN cargo build --features ${DB} --release --target=arm-unknown-linux-musleabi # because we already have a binary built FROM balenalib/rpi-alpine:3.15 -ENV ROCKET_ENV="staging" \ +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ ROCKET_PORT=80 \ - ROCKET_WORKERS=10 \ SSL_CERT_DIR=/etc/ssl/certs diff --git a/docker/armv6/Dockerfile.buildx b/docker/armv6/Dockerfile.buildx index 7d6131bf..6c6eb562 100644 --- a/docker/armv6/Dockerfile.buildx +++ b/docker/armv6/Dockerfile.buildx @@ -109,9 +109,9 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/. # because we already have a binary built FROM balenalib/rpi-debian:buster -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 # hadolint ignore=DL3059 RUN [ "cross-build-start" ] diff --git a/docker/armv6/Dockerfile.buildx.alpine b/docker/armv6/Dockerfile.buildx.alpine index 5e9d68f9..369dfb4b 100644 --- a/docker/armv6/Dockerfile.buildx.alpine +++ b/docker/armv6/Dockerfile.buildx.alpine @@ -27,7 +27,7 @@ FROM vaultwarden/web-vault@sha256:9b82318d553d72f091e8755f5aff80eed495f90bbe5b0703522953480f5c2fba as vault ########################## BUILD IMAGE ########################## -FROM blackdex/rust-musl:arm-musleabi-nightly-2022-01-23 as build +FROM blackdex/rust-musl:arm-musleabi-stable as build @@ -83,9 +83,9 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/. # because we already have a binary built FROM balenalib/rpi-alpine:3.15 -ENV ROCKET_ENV="staging" \ +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ ROCKET_PORT=80 \ - ROCKET_WORKERS=10 \ SSL_CERT_DIR=/etc/ssl/certs diff --git a/docker/armv7/Dockerfile b/docker/armv7/Dockerfile index 3ac3f106..5b26b5e1 100644 --- a/docker/armv7/Dockerfile +++ b/docker/armv7/Dockerfile @@ -109,9 +109,9 @@ RUN cargo build --features ${DB} --release --target=armv7-unknown-linux-gnueabih # because we already have a binary built FROM balenalib/armv7hf-debian:buster -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 # hadolint ignore=DL3059 RUN [ "cross-build-start" ] diff --git a/docker/armv7/Dockerfile.alpine b/docker/armv7/Dockerfile.alpine index 1ed36519..d00017bd 100644 --- a/docker/armv7/Dockerfile.alpine +++ b/docker/armv7/Dockerfile.alpine @@ -27,7 +27,7 @@ FROM vaultwarden/web-vault@sha256:9b82318d553d72f091e8755f5aff80eed495f90bbe5b0703522953480f5c2fba as vault ########################## BUILD IMAGE ########################## -FROM blackdex/rust-musl:armv7-musleabihf-nightly-2022-01-23 as build +FROM blackdex/rust-musl:armv7-musleabihf-stable as build @@ -86,9 +86,9 @@ RUN musl-strip target/armv7-unknown-linux-musleabihf/release/vaultwarden # because we already have a binary built FROM balenalib/armv7hf-alpine:3.15 -ENV ROCKET_ENV="staging" \ +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ ROCKET_PORT=80 \ - ROCKET_WORKERS=10 \ SSL_CERT_DIR=/etc/ssl/certs diff --git a/docker/armv7/Dockerfile.buildx b/docker/armv7/Dockerfile.buildx index 8df0f309..8c36f605 100644 --- a/docker/armv7/Dockerfile.buildx +++ b/docker/armv7/Dockerfile.buildx @@ -109,9 +109,9 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/. # because we already have a binary built FROM balenalib/armv7hf-debian:buster -ENV ROCKET_ENV="staging" \ - ROCKET_PORT=80 \ - ROCKET_WORKERS=10 +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ + ROCKET_PORT=80 # hadolint ignore=DL3059 RUN [ "cross-build-start" ] diff --git a/docker/armv7/Dockerfile.buildx.alpine b/docker/armv7/Dockerfile.buildx.alpine index 56d8e7ff..a80405d0 100644 --- a/docker/armv7/Dockerfile.buildx.alpine +++ b/docker/armv7/Dockerfile.buildx.alpine @@ -27,7 +27,7 @@ FROM vaultwarden/web-vault@sha256:9b82318d553d72f091e8755f5aff80eed495f90bbe5b0703522953480f5c2fba as vault ########################## BUILD IMAGE ########################## -FROM blackdex/rust-musl:armv7-musleabihf-nightly-2022-01-23 as build +FROM blackdex/rust-musl:armv7-musleabihf-stable as build @@ -86,9 +86,9 @@ RUN musl-strip target/armv7-unknown-linux-musleabihf/release/vaultwarden # because we already have a binary built FROM balenalib/armv7hf-alpine:3.15 -ENV ROCKET_ENV="staging" \ +ENV ROCKET_PROFILE="release" \ + ROCKET_ADDRESS=0.0.0.0 \ ROCKET_PORT=80 \ - ROCKET_WORKERS=10 \ SSL_CERT_DIR=/etc/ssl/certs |