2020-09-21 20:11:01 +00:00
|
|
|
FROM thegeeklab/alpine
|
2020-02-22 15:58:35 +00:00
|
|
|
|
|
|
|
LABEL maintainer="Robert Kaussow <mail@geeklabor.de>" \
|
|
|
|
org.label-schema.name="bitwardenrs" \
|
2020-02-22 17:08:14 +00:00
|
|
|
org.label-schema.vcs-url="https://gitea.rknet.org/docker/bitwardenrs" \
|
2020-02-22 15:58:35 +00:00
|
|
|
org.label-schema.vendor="Robert Kaussow" \
|
|
|
|
org.label-schema.schema-version="1.0"
|
|
|
|
|
2020-10-17 19:23:13 +00:00
|
|
|
ARG VAULT_VERSION
|
|
|
|
# renovate: datasource=github-releases depName=dani-garcia/bw_web_builds
|
2020-10-17 20:42:40 +00:00
|
|
|
ENV VAULT_VERSION="${VAULT_VERSION:-v2.16.1}"
|
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 && \
|
2020-10-17 20:09:14 +00:00
|
|
|
echo "Using Web Vault version '${VAULT_VERSION##v}' ..." && \
|
|
|
|
curl -SsL "https://github.com/dani-garcia/bw_web_builds/releases/download/${VAULT_VERSION}/bw_web_${VAULT_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/bitwarden_rs /app
|
|
|
|
|
|
|
|
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 []
|