From d9c35f4405e2e2442907595724a3eb9ce286a107 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:18:13 +0200 Subject: [PATCH] Clean up dockerfile --- DiscordChatExporter.Cli.dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DiscordChatExporter.Cli.dockerfile b/DiscordChatExporter.Cli.dockerfile index 5a95efc..9daeb58 100644 --- a/DiscordChatExporter.Cli.dockerfile +++ b/DiscordChatExporter.Cli.dockerfile @@ -42,11 +42,13 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false ENV LC_ALL=en_US.UTF-8 ENV LANG=en_US.UTF-8 +# Use a non-root user to ensure that the files shared with the host are accessible by the host user +# https://github.com/Tyrrrz/DiscordChatExporter/issues/851 +USER $APP_UID + # 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/app - -USER $APP_UID +COPY --from=build /tmp/app/DiscordChatExporter.Cli/bin/publish /opt/app ENTRYPOINT ["/opt/app/DiscordChatExporter.Cli"] \ No newline at end of file