Skip to content

Commit

Permalink
Fix use of nonroot user in Dockerfile (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValMati authored Nov 12, 2023
1 parent 71e20b9 commit 715b02c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ WORKDIR /app

COPY --from=build-env /publish .

USER nonroot
RUN addgroup --group app --gid 2000 \
&& adduser \
--uid 1000 \
--gid 2000 \
"app" \
&& chown app:app /app

USER app:app

ENTRYPOINT ["dotnet", "ValMati.StockBot.dll"]

0 comments on commit 715b02c

Please sign in to comment.