1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-07-27 22:29:10 +00:00

Generate Dockerfiles from one source for maintainability. Closes #785.

This commit is contained in:
Robin Schneider 2019-12-28 22:52:01 +01:00
commit 8280d200ea
No known key found for this signature in database
GPG key ID: A81E8006DC95EFE6
15 changed files with 615 additions and 148 deletions

View file

@ -1,21 +1,27 @@
# Using multistage build:
# Using multistage build:
# https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE #######################
FROM alpine:3.11 as vault
FROM debian:buster-slim as vault
ENV VAULT_VERSION "v2.12.0b"
ENV URL "https://github.com/dani-garcia/bw_web_builds/releases/download/$VAULT_VERSION/bw_web_$VAULT_VERSION.tar.gz"
RUN apk add --no-cache --upgrade \
curl \
tar
ENV DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8 \
TZ=UTC \
TERM=xterm-256color
RUN apt update -y \
&& apt install -y \
curl \
tar
RUN mkdir /web-vault
WORKDIR /web-vault
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
SHELL ["/bin/bash", "-o", "nounset", "-o", "pipefail", "-o", "errexit", "-c"]
RUN curl -L $URL | tar xz
RUN ls
@ -72,6 +78,7 @@ ENV ROCKET_ENV "staging"
ENV ROCKET_PORT=80
ENV ROCKET_WORKERS=10
# Install needed libraries
RUN apt-get update && apt-get install -y \
--no-install-recommends \