diff --git a/src/Admin/Dockerfile b/src/Admin/Dockerfile index 914d81be57..57da39a4e0 100644 --- a/src/Admin/Dockerfile +++ b/src/Admin/Dockerfile @@ -1,5 +1,9 @@ FROM microsoft/aspnetcore:2.0.5 +RUN groupadd -g 999 bitwarden && \ + useradd -r -u 999 -g bitwarden bitwarden +USER bitwarden + WORKDIR /app EXPOSE 80 COPY obj/Docker/publish . diff --git a/src/Api/Dockerfile b/src/Api/Dockerfile index 24aeab0973..7238300b1d 100644 --- a/src/Api/Dockerfile +++ b/src/Api/Dockerfile @@ -5,6 +5,10 @@ RUN apt-get update \ cron \ && rm -rf /var/lib/apt/lists/* +RUN groupadd -g 999 bitwarden && \ + useradd -r -u 999 -g bitwarden bitwarden +USER bitwarden + WORKDIR /app EXPOSE 80 COPY obj/Docker/publish/Api . diff --git a/src/Icons/Dockerfile b/src/Icons/Dockerfile index cc484bb4ea..9085b4f474 100644 --- a/src/Icons/Dockerfile +++ b/src/Icons/Dockerfile @@ -5,6 +5,10 @@ RUN apt-get update \ unzip \ && rm -rf /var/lib/apt/lists/* +RUN groupadd -g 999 bitwarden && \ + useradd -r -u 999 -g bitwarden 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 \ diff --git a/src/Identity/Dockerfile b/src/Identity/Dockerfile index 914d81be57..57da39a4e0 100644 --- a/src/Identity/Dockerfile +++ b/src/Identity/Dockerfile @@ -1,5 +1,9 @@ FROM microsoft/aspnetcore:2.0.5 +RUN groupadd -g 999 bitwarden && \ + useradd -r -u 999 -g bitwarden bitwarden +USER bitwarden + WORKDIR /app EXPOSE 80 COPY obj/Docker/publish . diff --git a/util/Server/Dockerfile b/util/Server/Dockerfile index ae5f57cc39..dfa84babd1 100644 --- a/util/Server/Dockerfile +++ b/util/Server/Dockerfile @@ -1,2 +1,7 @@ FROM microsoft/aspnetcore:2.0.5 + +RUN groupadd -g 999 bitwarden && \ + useradd -r -u 999 -g bitwarden bitwarden +USER bitwarden + COPY obj/Docker/publish /bitwarden_server diff --git a/util/Setup/Dockerfile b/util/Setup/Dockerfile index 4b95e2c74a..d780a514bd 100644 --- a/util/Setup/Dockerfile +++ b/util/Setup/Dockerfile @@ -5,5 +5,9 @@ RUN apt-get update \ openssl \ && rm -rf /var/lib/apt/lists/* +RUN groupadd -g 999 bitwarden && \ + useradd -r -u 999 -g bitwarden bitwarden +USER bitwarden + WORKDIR /app COPY obj/Docker/publish .