-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (29 loc) · 779 Bytes
/
Copy pathDockerfile
File metadata and controls
43 lines (29 loc) · 779 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# build
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
ENV DOTNET_EnableDiagnostics=0
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
# RUN apk add --no-cache \
# icu-libs \
# && rm -rf /var/cache/apk/*
WORKDIR /source
COPY ltbdb2-core.sln .
COPY src ./src
RUN dotnet restore
RUN dotnet publish -c Release -o publish --no-restore src/LtbDb2
# final
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
ENV DOTNET_EnableDiagnostics=0
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
RUN apk add --no-cache \
icu-libs \
icu-data-full \
tzdata \
graphicsmagick \
&& rm -rf /var/cache/apk/*
VOLUME ["/data"]
WORKDIR /app
COPY --from=build /source/publish .
COPY docker/appsettings.json .
COPY docker/NLog.config .
EXPOSE 5000
ENTRYPOINT ["dotnet", "LtbDb2.dll"]