1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00
This commit is contained in:
Kyle Spearrin 2018-03-27 15:44:25 -04:00
parent 0fc1415a06
commit 832ddddc58
2 changed files with 14 additions and 8 deletions

View File

@ -1,5 +1,10 @@
FROM bitwarden/server
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gosu \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
WORKDIR /app
EXPOSE 5000
@ -7,12 +12,6 @@ COPY ./dist .
COPY entrypoint.sh /
RUN groupadd -g 999 bitwarden \
&& useradd -r -u 999 -g bitwarden bitwarden \
&& chown -R bitwarden:bitwarden /app \
&& mkdir -p /etc/bitwarden/web \
&& chown -R bitwarden:bitwarden /etc/bitwarden \
&& chmod +x /entrypoint.sh \
&& chown bitwarden:bitwarden /entrypoint.sh
&& chmod +x /entrypoint.sh
USER bitwarden
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -1,5 +1,12 @@
#!/bin/sh
useradd -r -u ${LOCAL_UID:-999} -g bitwarden bitwarden
chown -R bitwarden:bitwarden /etc/bitwarden
cp /etc/bitwarden/web/settings.js /app/js/settings.js
cp /etc/bitwarden/web/app-id.json /app/app-id.json
dotnet /bitwarden_server/Server.dll /contentRoot=/app /webRoot=. /serveUnknown=false
chown -R bitwarden:bitwarden /app
chown -R bitwarden:bitwarden /bitwarden_server
gosu bitwarden:bitwarden dotnet /bitwarden_server/Server.dll \
/contentRoot=/app /webRoot=. /serveUnknown=false