-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (21 loc) · 975 Bytes
/
Dockerfile
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
27
28
29
30
31
32
33
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
WORKDIR /src
COPY SqliteArchive/SqliteArchive.csproj SqliteArchive/
COPY SqliteArchive.Ftp/SqliteArchive.Ftp.csproj SqliteArchive.Ftp/
COPY SqliteArchive.Server/SqliteArchive.Server.csproj SqliteArchive.Server/
RUN dotnet restore SqliteArchive.Server/SqliteArchive.Server.csproj
COPY . .
RUN dotnet publish SqliteArchive.Server/SqliteArchive.Server.csproj \
--no-restore -c Release -o /app/publish /p:UseAppHost=false
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
RUN apk add --no-cache tzdata icu-libs
WORKDIR /srv
EXPOSE 80 21 10000-10009
ENV ASPNETCORE_CONTENTROOT=/app
ENV ASPNETCORE_HTTP_PORTS=80
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
ENV LANG=en_US
COPY --from=build /app/publish /app
ENTRYPOINT ["dotnet", "/app/SqliteArchive.Server.dll"]
HEALTHCHECK --start-period=1m --start-interval=1s \
CMD wget --no-verbose --tries=1 --spider http://localhost:${ASPNETCORE_HTTP_PORTS} || exit 1