-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
32 lines (27 loc) · 981 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
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build
ARG PUB_ENV=Staging
# --------------------------------------------------
# > PREPARE
# --------------------------------------------------
WORKDIR /source
COPY Pumpkin.sln .
COPY Src/. ./Src/
# --------------------------------------------------
# > BUILD
# --------------------------------------------------
WORKDIR /source/Src/Presentation/ClientWebApi
RUN dotnet build -c $PUB_ENV
# --------------------------------------------------
# > PUBLISH
# --------------------------------------------------
RUN dotnet publish -c $PUB_ENV -o /app --no-build
# --------------------------------------------------
# > DEPLOY
# --------------------------------------------------
FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine
WORKDIR /app
COPY --from=build /app ./
RUN #apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
ENTRYPOINT ["dotnet", "ClientWebApi.dll"]