mirror of
https://github.com/bitwarden/server.git
synced 2024-11-22 12:15:36 +01:00
running as bitwarden user
This commit is contained in:
parent
e499087a57
commit
19fa9bf806
@ -1,13 +1,17 @@
|
||||
FROM microsoft/aspnetcore:2.0.5
|
||||
|
||||
USER root
|
||||
RUN groupadd -g 999 bitwarden && \
|
||||
useradd -r -u 999 -g bitwarden bitwarden
|
||||
USER bitwarden
|
||||
|
||||
USER bitwarden
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
COPY obj/Docker/publish .
|
||||
|
||||
COPY entrypoint.sh /
|
||||
|
||||
USER root
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
USER bitwarden
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,5 +1,6 @@
|
||||
FROM microsoft/aspnetcore:2.0.5
|
||||
|
||||
USER root
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
cron \
|
||||
@ -7,17 +8,23 @@ RUN apt-get update \
|
||||
|
||||
RUN groupadd -g 999 bitwarden && \
|
||||
useradd -r -u 999 -g bitwarden bitwarden
|
||||
USER bitwarden
|
||||
|
||||
USER bitwarden
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
COPY obj/Docker/publish/Api .
|
||||
|
||||
COPY obj/Docker/publish/Jobs /jobs
|
||||
|
||||
USER root
|
||||
RUN mv /jobs/crontab /etc/cron.d/bitwarden-cron \
|
||||
&& chmod 0644 /etc/cron.d/bitwarden-cron \
|
||||
&& touch /var/log/cron.log
|
||||
|
||||
USER bitwarden
|
||||
COPY entrypoint.sh /
|
||||
|
||||
USER root
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
USER bitwarden
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,5 +1,6 @@
|
||||
FROM microsoft/aspnetcore:2.0.5
|
||||
|
||||
USER root
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
unzip \
|
||||
@ -7,8 +8,8 @@ RUN apt-get update \
|
||||
|
||||
RUN groupadd -g 999 bitwarden && \
|
||||
useradd -r -u 999 -g bitwarden bitwarden
|
||||
USER bitwarden
|
||||
|
||||
USER bitwarden
|
||||
WORKDIR /tmp
|
||||
COPY iconserver.sha256 .
|
||||
RUN curl -L -o iconserver.zip https://github.com/mat/besticon/releases/download/v3.6.0/iconserver_linux_amd64.zip \
|
||||
@ -21,5 +22,9 @@ EXPOSE 80
|
||||
COPY obj/Docker/publish .
|
||||
|
||||
COPY entrypoint.sh /
|
||||
|
||||
USER root
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
USER bitwarden
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
/etc/iconserver/iconserver &
|
||||
/iconserver/iconserver &
|
||||
dotnet /app/Icons.dll iconsSettings:bestIconBaseUrl=http://localhost:8080
|
||||
|
@ -1,13 +1,17 @@
|
||||
FROM microsoft/aspnetcore:2.0.5
|
||||
|
||||
USER root
|
||||
RUN groupadd -g 999 bitwarden && \
|
||||
useradd -r -u 999 -g bitwarden bitwarden
|
||||
USER bitwarden
|
||||
|
||||
USER bitwarden
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
COPY obj/Docker/publish .
|
||||
|
||||
COPY entrypoint.sh /
|
||||
|
||||
USER root
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
USER bitwarden
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,7 +1,11 @@
|
||||
FROM bitwarden/server
|
||||
|
||||
USER bitwarden
|
||||
EXPOSE 80
|
||||
|
||||
COPY entrypoint.sh /
|
||||
|
||||
USER root
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
USER bitwarden
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,18 +1,26 @@
|
||||
FROM microsoft/mssql-server-linux:2017-CU4
|
||||
|
||||
USER root
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
cron \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd -g 999 bitwarden && \
|
||||
useradd -r -u 999 -g bitwarden bitwarden
|
||||
|
||||
COPY crontab /etc/cron.d/bitwarden-cron
|
||||
RUN chmod 0644 /etc/cron.d/bitwarden-cron \
|
||||
&& touch /var/log/cron.log
|
||||
|
||||
USER bitwarden
|
||||
COPY backup-db.sql /
|
||||
COPY backup-db.sh /
|
||||
RUN chmod +x /backup-db.sh
|
||||
|
||||
COPY entrypoint.sh /
|
||||
|
||||
USER root
|
||||
RUN chmod +x /backup-db.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
USER bitwarden
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,9 +1,17 @@
|
||||
FROM nginx:1.12
|
||||
|
||||
USER root
|
||||
RUN groupadd -g 999 bitwarden && \
|
||||
useradd -r -u 999 -g bitwarden bitwarden
|
||||
|
||||
USER bitwarden
|
||||
COPY nginx.conf /etc/nginx
|
||||
COPY proxy.conf /etc/nginx
|
||||
COPY mime.types /etc/nginx
|
||||
|
||||
COPY entrypoint.sh /
|
||||
|
||||
USER root
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
USER bitwarden
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,7 +1,8 @@
|
||||
FROM microsoft/aspnetcore:2.0.5
|
||||
|
||||
USER root
|
||||
RUN groupadd -g 999 bitwarden && \
|
||||
useradd -r -u 999 -g bitwarden bitwarden
|
||||
USER bitwarden
|
||||
|
||||
USER bitwarden
|
||||
COPY obj/Docker/publish /bitwarden_server
|
||||
|
@ -1,13 +1,14 @@
|
||||
FROM microsoft/dotnet:2.0.5-runtime
|
||||
|
||||
USER root
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
openssl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd -g 999 bitwarden && \
|
||||
useradd -r -u 999 -g bitwarden bitwarden
|
||||
USER bitwarden
|
||||
|
||||
USER bitwarden
|
||||
WORKDIR /app
|
||||
COPY obj/Docker/publish .
|
||||
|
Loading…
Reference in New Issue
Block a user