Modify dockerfile to use non-root user (#952)

pull/957/head
BamButz 2 years ago committed by GitHub
parent 873d055191
commit 913255f04f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,7 +12,9 @@ RUN dotnet publish DiscordChatExporter.Cli -c Release -o ./publish
# Run
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS run
COPY --from=build ./publish ./
COPY --from=build ./publish /opt/dce
WORKDIR ./out
ENTRYPOINT ["dotnet", "/DiscordChatExporter.Cli.dll"]
RUN useradd dce
USER dce
WORKDIR /out
ENTRYPOINT ["dotnet", "/opt/dce/DiscordChatExporter.Cli.dll"]
Loading…
Cancel
Save