1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 05:00:19 -05:00

use gosu to step down in entrypoint

This commit is contained in:
Kyle Spearrin 2018-03-26 21:38:32 -04:00
parent aa3223b974
commit 005f1e59a0
4 changed files with 7 additions and 4 deletions

View File

@ -3,6 +3,7 @@ FROM microsoft/aspnetcore:2.0.5
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
cron \
gosu \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000
@ -25,5 +26,4 @@ RUN groupadd -g 999 bitwarden \
&& chmod +x /entrypoint.sh \
&& chown bitwarden:bitwarden /entrypoint.sh
USER bitwarden
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -2,4 +2,5 @@
env >> /etc/environment
cron
dotnet /app/Api.dll
gosu bitwarden:bitwarden dotnet /app/Api.dll

View File

@ -3,6 +3,7 @@ FROM microsoft/mssql-server-linux:2017-CU4
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
cron \
gosu \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -g 999 bitwarden \
@ -27,5 +28,4 @@ RUN mkdir -p /etc/bitwarden/mssql/backups \
&& chown bitwarden:bitwarden /backup-db.sh \
&& chown bitwarden:bitwarden /backup-db.sql
USER bitwarden
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -2,4 +2,6 @@
env >> /etc/environment
cron
/opt/mssql/bin/sqlservr
chown -R bitwarden:bitwarden /var/opt/mssql
gosu bitwarden:bitwarden /opt/mssql/bin/sqlservr