vaultwarden/Dockerfile

44 lines
1.5 KiB
Docker
Raw Normal View History

FROM thegeeklab/alpine:latest@sha256:3de659c1a479d9d80e9c3924227981450af3a068087545a47360cfc2e70a91cc
2020-02-22 15:58:35 +00:00
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="vaultwarden"
LABEL org.opencontainers.image.url="https://gitea.rknet.org/docker/vaultwarden"
LABEL org.opencontainers.image.source="https://gitea.rknet.org/docker/vaultwarden"
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/docker/vaultwarden"
2020-02-22 15:58:35 +00:00
2021-05-13 21:17:24 +00:00
ARG WEBWEBVAULT_VERSION
2020-10-17 19:23:13 +00:00
# renovate: datasource=github-releases depName=dani-garcia/bw_web_builds
2021-05-13 22:00:35 +00:00
ENV WEBVAULT_VERSION="${WEBVAULT_VERSION:-v2.19.0d}"
2020-02-22 15:58:35 +00:00
ADD overlay/ /
RUN apk --update add --virtual .build-deps tar curl && \
2020-10-17 21:17:18 +00:00
apk --update add openssl postgresql-libs sqlite ca-certificates && \
2020-02-22 15:58:35 +00:00
mkdir -p /app/web-vault /app/data && \
2021-05-13 21:17:24 +00:00
echo "Using Web Vault version '${WEBVAULT_VERSION##v}' ..." && \
curl -SsL "https://github.com/dani-garcia/bw_web_builds/releases/download/${WEBVAULT_VERSION}/bw_web_${WEBVAULT_VERSION}.tar.gz" | \
2020-02-22 19:21:14 +00:00
tar xz -C /app && \
2020-02-22 15:58:35 +00:00
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/* && \
chown -R app:app /app
ADD src/Rocket.toml /app
ADD src/target/x86_64-unknown-linux-musl/release/vaultwarden /app
2020-02-22 15:58:35 +00:00
VOLUME /app/data
EXPOSE 8080
EXPOSE 3012
USER app
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/entrypoint"]
HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD /usr/local/bin/healthcheck
WORKDIR /app
CMD []