mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
docker as non-root
This commit is contained in:
@ -3,7 +3,17 @@ FROM nginx:1.12
|
||||
COPY nginx.conf /etc/nginx
|
||||
COPY proxy.conf /etc/nginx
|
||||
COPY mime.types /etc/nginx
|
||||
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
RUN groupadd -g 999 bitwarden \
|
||||
&& useradd -r -u 999 -g bitwarden bitwarden \
|
||||
&& mkdir /etc/bitwarden \
|
||||
&& chown -R bitwarden:bitwarden /etc/bitwarden \
|
||||
&& chmod +x /entrypoint.sh \
|
||||
&& chown bitwarden:bitwarden /entrypoint.sh \
|
||||
&& touch /var/run/nginx.pid \
|
||||
&& chown -R proxytest:proxytest /var/run/nginx.pid \
|
||||
&& chown -R proxytest:proxytest /var/cache/nginx
|
||||
|
||||
USER bitwarden
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
Reference in New Issue
Block a user