2025-07-28 10:56:20 -04:00
|
|
|
FROM --platform=$BUILDPLATFORM nginx:stable-alpine3.21
|
2017-08-04 12:21:13 -04:00
|
|
|
|
2025-05-30 10:29:47 -07:00
|
|
|
ARG TARGETPLATFORM
|
2018-06-09 14:17:16 +02:00
|
|
|
LABEL com.bitwarden.product="bitwarden"
|
|
|
|
|
|
2025-05-30 10:29:47 -07:00
|
|
|
ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
|
|
|
|
|
|
2025-07-28 10:56:20 -04:00
|
|
|
RUN apk add --no-cache curl \
|
|
|
|
|
shadow \
|
|
|
|
|
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu
|
2018-03-27 14:55:33 -04:00
|
|
|
|
2025-05-30 10:29:47 -07:00
|
|
|
COPY util/Nginx/nginx.conf /etc/nginx
|
|
|
|
|
COPY util/Nginx/proxy.conf /etc/nginx
|
|
|
|
|
COPY util/Nginx/mime.types /etc/nginx
|
|
|
|
|
COPY util/Nginx/security-headers.conf /etc/nginx
|
|
|
|
|
COPY util/Nginx/security-headers-ssl.conf /etc/nginx
|
|
|
|
|
COPY util/Nginx/logrotate.sh /
|
|
|
|
|
COPY util/Nginx/entrypoint.sh /
|
2018-11-16 14:56:12 +01:00
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
EXPOSE 8443
|
|
|
|
|
|
2019-11-25 14:34:47 +01:00
|
|
|
RUN chmod +x /entrypoint.sh \
|
|
|
|
|
&& chmod +x /logrotate.sh
|
2018-03-26 11:21:03 -04:00
|
|
|
|
2019-07-27 21:53:49 -04:00
|
|
|
HEALTHCHECK CMD curl --insecure -Lfs https://localhost:8443/alive || curl -Lfs http://localhost:8080/alive || exit 1
|
2019-07-26 12:43:06 -04:00
|
|
|
|
2017-08-07 16:31:00 -04:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|