1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

non-root docker

This commit is contained in:
Kyle Spearrin 2018-03-26 11:24:09 -04:00
parent 3160d3f275
commit 1ab408c591

View File

@ -1,14 +1,18 @@
FROM bitwarden/server
RUN groupadd -g 999 bitwarden && \
useradd -r -u 999 -g bitwarden bitwarden
USER bitwarden
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
COPY ./dist .
EXPOSE 80
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
RUN groupadd -g 999 bitwarden \
&& useradd -r -u 999 -g bitwarden bitwarden \
&& chown -R bitwarden:bitwarden /app \
&& mkdir /etc/bitwarden \
&& chown -R bitwarden:bitwarden /etc/bitwarden \
&& chmod +x /entrypoint.sh \
&& chown bitwarden:bitwarden /entrypoint.sh
USER bitwarden
ENTRYPOINT ["/entrypoint.sh"]