-
-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (16 loc) · 630 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (16 loc) · 630 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /app
COPY . ./
RUN dotnet restore MailArchiver.csproj && dotnet publish MailArchiver.csproj -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
# Install Kerberos library required by MailKit (libgssapi_krb5.so.2)r
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgssapi-krb5-2 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/out ./
ENV ASPNETCORE_URLS=http://+:5000
ENV ASPNETCORE_ENVIRONMENT=Production
EXPOSE 5000
ENV TZ=UTC
ENTRYPOINT ["dotnet", "MailArchiver.dll"]