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:
parent
3160d3f275
commit
1ab408c591
20
Dockerfile
20
Dockerfile
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user