You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DiscordChatExporter/DiscordChatExporter.Cli.doc...

39 lines
1.1 KiB

# Build
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build
WORKDIR /build
COPY favicon.ico ./
COPY NuGet.config ./
COPY Directory.Build.props ./
COPY DiscordChatExporter.Core ./DiscordChatExporter.Core
COPY DiscordChatExporter.Cli ./DiscordChatExporter.Cli
RUN dotnet publish DiscordChatExporter.Cli \
--self-contained \
--use-current-runtime \
--configuration Release \
--output ./publish
# Run
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0-alpine
# tzdata is needed for DateTimeOffset.ToLocalTime (for TimeZoneInfo.Local, to be precise)
RUN apk add --no-cache tzdata
RUN adduser \
--disabled-password \
--no-create-home \
dce
USER dce
COPY --from=build /build/publish /opt/discord_chat_exporter
# Need to keep this as /out for backwards compatibility with documentation.
# A lot of people have this directory mounted in their scripts files, so
# changing it would break existing workflows.
WORKDIR /out
# Having it in PATH is convenient for interactive shell sessions,
# which may be useful for debugging.
ENV PATH="$PATH:/opt/discord_chat_exporter"
ENTRYPOINT ["DiscordChatExporter.Cli"]