Skip to content

Commit 76d1501

Browse files
Merge pull request #1048 from TransactionProcessing/copilot/codacy-issue-25bbb5b61fbc369b427e4148a8211785-fix
Fix containers running as root in Dockerfiles
2 parents e9de5ed + 7e9bc10 commit 76d1501

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

SecurityService/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ RUN dotnet publish "SecurityService.csproj" -c Release -o /app
3333
FROM base AS final
3434
WORKDIR /app
3535
COPY --from=publish /app .
36+
USER app
3637
ENTRYPOINT ["dotnet", "SecurityService.dll"]

SecurityServiceTestUI/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ RUN dotnet publish "SecurityServiceTestUI.csproj" -c Release -o /app/publish
3232
FROM base AS final
3333
WORKDIR /app
3434
COPY --from=publish /app/publish .
35-
35+
USER app
3636
ENTRYPOINT ["dotnet", "SecurityServiceTestUI.dll"]

0 commit comments

Comments
 (0)