vaultwarden/Dockerfile.amd64

46 lines
1.7 KiB
Docker
Raw Permalink Normal View History

2020-01-16 23:57:45 +00:00
FROM alpine:3.11
LABEL maintainer="Robert Kaussow <mail@geeklabor.de>" \
org.label-schema.name="bitwardenrs" \
org.label-schema.version="1.2" \
org.label-schema.vendor="Robert Kaussow" \
org.label-schema.schema-version="1.0"
2020-02-21 22:20:54 +00:00
ARG VAULT_VERSION=2.12.0c
2020-01-16 23:57:45 +00:00
ARG VAULT_TARBALL=https://github.com/dani-garcia/bw_web_builds/releases/download/v${VAULT_VERSION}/bw_web_v${VAULT_VERSION}.tar.gz
RUN addgroup -g 101 -S app && \
adduser -S -D -H -u 101 -h /app -s /sbin/nologin -G app -g app app && \
2020-01-17 10:36:37 +00:00
apk --update add --virtual .build-deps tar curl && \
2020-01-18 14:33:47 +00:00
apk --update add openssl postgresql-libs ca-certificates && \
2020-01-17 10:36:37 +00:00
curl -SsL -o /usr/local/bin/gomplate https://github.com/hairyhenderson/gomplate/releases/download/v3.5.0/gomplate_linux-amd64-slim && \
curl -SsL -o /usr/local/bin/url-parser https://github.com/xoxys/url-parser/releases/download/v0.1.0/url-parser-0.1.0-linux-amd64 && \
curl -SsL -o /usr/local/bin/wait-for https://raw.githubusercontent.com/xoxys/wait-for/master/wait-for && \
2020-01-17 10:36:37 +00:00
chmod 755 /usr/local/bin/gomplate && \
chmod 755 /usr/local/bin/url-parser && \
chmod 755 /usr/local/bin/wait-for && \
2020-01-17 10:36:37 +00:00
mkdir -p /app/web-vault /app/data && \
2020-01-16 23:57:45 +00:00
curl -SsL ${VAULT_TARBALL} | tar xz -C /app/web-vault && \
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/* && \
chown -R app:app /app
ADD overlay/ /
ADD source/Rocket.toml /app
ADD source/target/x86_64-unknown-linux-musl/release/bitwarden_rs /app
2020-01-17 10:36:37 +00:00
VOLUME /app/data
2020-01-16 23:57:45 +00:00
EXPOSE 8080
2020-01-20 12:37:12 +00:00
EXPOSE 3012
2020-01-16 23:57:45 +00:00
USER app
STOPSIGNAL SIGTERM
2020-02-01 17:34:59 +00:00
ENTRYPOINT ["/usr/local/bin/entrypoint"]
HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD /usr/local/bin/healthcheck
2020-01-16 23:57:45 +00:00
WORKDIR /app
CMD []