mirror of
				https://github.com/dani-garcia/vaultwarden.git
				synced 2025-10-31 18:28:20 +02:00 
			
		
		
		
	Updated web vault, dependencies and base docker images
This commit is contained in:
		| @@ -1,10 +1,10 @@ | ||||
| # This file was generated using a Jinja2 template. | ||||
| # Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfile's. | ||||
|  | ||||
| {% set build_stage_base_image = "rust:1.45" %} | ||||
| {% set build_stage_base_image = "rust:1.46" %} | ||||
| {% if "alpine" in target_file %} | ||||
| {%   if "amd64" in target_file %} | ||||
| {%     set build_stage_base_image = "clux/muslrust:nightly-2020-07-09" %} | ||||
| {%     set build_stage_base_image = "clux/muslrust:nightly-2020-10-02" %} | ||||
| {%     set runtime_stage_base_image = "alpine:3.12" %} | ||||
| {%     set package_arch_name = "" %} | ||||
| {%   elif "arm32v7" in target_file %} | ||||
| @@ -33,17 +33,17 @@ | ||||
| # 	https://docs.docker.com/develop/develop-images/multistage-build/ | ||||
| # 	https://whitfin.io/speeding-up-rust-docker-builds/ | ||||
| ####################### VAULT BUILD IMAGE  ####################### | ||||
| {% set vault_image_hash = "sha256:a6705a4d7776500a6544afd141de1786e6b87c386b068be996294960779cb5bf" %} | ||||
| {% set vault_image_hash = "sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303" %} | ||||
| {% raw %} | ||||
| #  This hash is extracted from the docker web-vault builds and it's prefered over a simple tag because it's immutable. | ||||
| #  It can be viewed in multiple ways: | ||||
| #  - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. | ||||
| #  - From the console, with the following commands: | ||||
| #      docker pull bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.1 | ||||
| # | ||||
| #  - To do the opposite, and get the tag from the hash, you can do: | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:a6705a4d7776500a6544afd141de1786e6b87c386b068be996294960779cb5bf | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 | ||||
| {% endraw %} | ||||
| FROM bitwardenrs/web-vault@{{ vault_image_hash }} as vault | ||||
|  | ||||
|   | ||||
| @@ -10,15 +10,15 @@ | ||||
| #  It can be viewed in multiple ways: | ||||
| #  - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. | ||||
| #  - From the console, with the following commands: | ||||
| #      docker pull bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker pull bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.1 | ||||
| # | ||||
| #  - To do the opposite, and get the tag from the hash, you can do: | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:afba1e3bded09dc0a6a0dbacb3363ac33b6f122b4b26d3682cafb9115bdf785c | ||||
| FROM bitwardenrs/web-vault@sha256:3581afd49201ea11edc5372ee3ffd8945f005602d9adc0300dcc7ef6860f232c as vault | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 | ||||
| FROM bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 as vault | ||||
|  | ||||
| ########################## BUILD IMAGE  ########################## | ||||
| FROM rust:1.45 as build | ||||
| FROM rust:1.46 as build | ||||
|  | ||||
| # AMD64 supports all | ||||
| ARG DB=sqlite,mysql,postgresql | ||||
| @@ -45,6 +45,7 @@ COPY ./Cargo.* ./ | ||||
| COPY ./rust-toolchain ./rust-toolchain | ||||
| COPY ./build.rs ./build.rs | ||||
|  | ||||
|  | ||||
| # Builds your dependencies and removes the | ||||
| # dummy project, except the target folder | ||||
| # This folder contains the compiled dependencies | ||||
| @@ -101,3 +102,4 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | ||||
| # Configures the startup! | ||||
| WORKDIR / | ||||
| CMD ["/start.sh"] | ||||
|  | ||||
|   | ||||
| @@ -10,15 +10,15 @@ | ||||
| #  It can be viewed in multiple ways: | ||||
| #  - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. | ||||
| #  - From the console, with the following commands: | ||||
| #      docker pull bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker pull bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.1 | ||||
| # | ||||
| #  - To do the opposite, and get the tag from the hash, you can do: | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:afba1e3bded09dc0a6a0dbacb3363ac33b6f122b4b26d3682cafb9115bdf785c | ||||
| FROM bitwardenrs/web-vault@sha256:3581afd49201ea11edc5372ee3ffd8945f005602d9adc0300dcc7ef6860f232c as vault | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 | ||||
| FROM bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 as vault | ||||
|  | ||||
| ########################## BUILD IMAGE  ########################## | ||||
| FROM clux/muslrust:nightly-2020-07-09 as build | ||||
| FROM clux/muslrust:nightly-2020-10-02 as build | ||||
|  | ||||
| # Alpine only works on SQlite | ||||
| ARG DB=sqlite | ||||
| @@ -59,7 +59,7 @@ RUN touch src/main.rs | ||||
|  | ||||
| # Builds again, this time it'll just be | ||||
| # your actual source files being built | ||||
| RUN cargo build --features ${DB} --release | ||||
| RUN cargo build --features ${DB} --release --target=x86_64-unknown-linux-musl | ||||
|  | ||||
| ######################## RUNTIME IMAGE  ######################## | ||||
| # Create a new stage with a minimal image | ||||
| @@ -96,3 +96,4 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | ||||
| # Configures the startup! | ||||
| WORKDIR / | ||||
| CMD ["/start.sh"] | ||||
|  | ||||
|   | ||||
| @@ -10,15 +10,15 @@ | ||||
| #  It can be viewed in multiple ways: | ||||
| #  - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. | ||||
| #  - From the console, with the following commands: | ||||
| #      docker pull bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker pull bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.1 | ||||
| # | ||||
| #  - To do the opposite, and get the tag from the hash, you can do: | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:afba1e3bded09dc0a6a0dbacb3363ac33b6f122b4b26d3682cafb9115bdf785c | ||||
| FROM bitwardenrs/web-vault@sha256:3581afd49201ea11edc5372ee3ffd8945f005602d9adc0300dcc7ef6860f232c as vault | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 | ||||
| FROM bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 as vault | ||||
|  | ||||
| ########################## BUILD IMAGE  ########################## | ||||
| FROM rust:1.45 as build | ||||
| FROM rust:1.46 as build | ||||
|  | ||||
| # ARM only supports SQLite for now | ||||
| ARG DB=sqlite | ||||
| @@ -124,3 +124,4 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | ||||
| # Configures the startup! | ||||
| WORKDIR / | ||||
| CMD ["/start.sh"] | ||||
|  | ||||
|   | ||||
| @@ -10,15 +10,15 @@ | ||||
| #  It can be viewed in multiple ways: | ||||
| #  - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. | ||||
| #  - From the console, with the following commands: | ||||
| #      docker pull bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker pull bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.1 | ||||
| # | ||||
| #  - To do the opposite, and get the tag from the hash, you can do: | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:afba1e3bded09dc0a6a0dbacb3363ac33b6f122b4b26d3682cafb9115bdf785c | ||||
| FROM bitwardenrs/web-vault@sha256:3581afd49201ea11edc5372ee3ffd8945f005602d9adc0300dcc7ef6860f232c as vault | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 | ||||
| FROM bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 as vault | ||||
|  | ||||
| ########################## BUILD IMAGE  ########################## | ||||
| FROM rust:1.45 as build | ||||
| FROM rust:1.46 as build | ||||
|  | ||||
| # ARM only supports SQLite for now | ||||
| ARG DB=sqlite | ||||
| @@ -124,3 +124,4 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | ||||
| # Configures the startup! | ||||
| WORKDIR / | ||||
| CMD ["/start.sh"] | ||||
|  | ||||
|   | ||||
| @@ -11,11 +11,11 @@ | ||||
| #  - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. | ||||
| #  - From the console, with the following commands: | ||||
| #      docker pull bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.1 | ||||
| # | ||||
| #  - To do the opposite, and get the tag from the hash, you can do: | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:a6705a4d7776500a6544afd141de1786e6b87c386b068be996294960779cb5bf | ||||
| FROM bitwardenrs/web-vault@sha256:a6705a4d7776500a6544afd141de1786e6b87c386b068be996294960779cb5bf as vault | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 | ||||
| FROM bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 as vault | ||||
|  | ||||
| ########################## BUILD IMAGE  ########################## | ||||
| FROM messense/rust-musl-cross:armv7-musleabihf as build | ||||
| @@ -65,7 +65,7 @@ RUN musl-strip target/armv7-unknown-linux-musleabihf/release/bitwarden_rs | ||||
| ######################## RUNTIME IMAGE  ######################## | ||||
| # Create a new stage with a minimal image | ||||
| # because we already have a binary built | ||||
| FROM cmosh/alpine-arm | ||||
| FROM cmosh/alpine-arm:3.6 | ||||
|  | ||||
| ENV ROCKET_ENV "staging" | ||||
| ENV ROCKET_PORT=80 | ||||
|   | ||||
| @@ -10,15 +10,15 @@ | ||||
| #  It can be viewed in multiple ways: | ||||
| #  - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. | ||||
| #  - From the console, with the following commands: | ||||
| #      docker pull bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.15.1 | ||||
| #      docker pull bitwardenrs/web-vault:v2.16.0b | ||||
| #      docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.16.1 | ||||
| # | ||||
| #  - To do the opposite, and get the tag from the hash, you can do: | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:afba1e3bded09dc0a6a0dbacb3363ac33b6f122b4b26d3682cafb9115bdf785c | ||||
| FROM bitwardenrs/web-vault@sha256:3581afd49201ea11edc5372ee3ffd8945f005602d9adc0300dcc7ef6860f232c as vault | ||||
| #      docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 | ||||
| FROM bitwardenrs/web-vault@sha256:e40228f94cead5e50af6575fb39850a002dad146dab6836e5da5663e6d214303 as vault | ||||
|  | ||||
| ########################## BUILD IMAGE  ########################## | ||||
| FROM rust:1.45 as build | ||||
| FROM rust:1.46 as build | ||||
|  | ||||
| # ARM only supports SQLite for now | ||||
| ARG DB=sqlite | ||||
| @@ -124,3 +124,4 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | ||||
| # Configures the startup! | ||||
| WORKDIR / | ||||
| CMD ["/start.sh"] | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user