From 6a71c59b6d19b3b3a5157960be2105a5a18af321 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:24:28 +0200 Subject: [PATCH] Don't need to create a user in Docker anymore with .NET 8 --- DiscordChatExporter.Cli.dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/DiscordChatExporter.Cli.dockerfile b/DiscordChatExporter.Cli.dockerfile index 595e1ab..d5bb5e8 100644 --- a/DiscordChatExporter.Cli.dockerfile +++ b/DiscordChatExporter.Cli.dockerfile @@ -42,14 +42,11 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false ENV LC_ALL=en_US.UTF-8 ENV LANG=en_US.UTF-8 -# Create a non-root user to run the app, so that the output files can be accessed by the host -# https://github.com/Tyrrrz/DiscordChatExporter/issues/851 -RUN adduser --disabled-password --no-create-home dce -USER dce - # This directory is exposed to the user for mounting purposes, so it's important that it always # stays the same for backwards compatibility. WORKDIR /out COPY --from=build /tmp/dce/DiscordChatExporter.Cli/bin/publish /opt/dce + +USER $APP_UID ENTRYPOINT ["/opt/dce/DiscordChatExporter.Cli"] \ No newline at end of file