forked from nopSolutions/nopCommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (20 loc) · 864 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
# create the build instance
FROM microsoft/dotnet:2.2-sdk AS build
WORKDIR /src
COPY ./src ./
# restore solution
RUN dotnet restore NopCommerce.sln
WORKDIR /src/Presentation/Nop.Web
# build and publish project
RUN dotnet build Nop.Web.csproj -c Release -o /app
RUN dotnet publish Nop.Web.csproj -c Release -o /app/published
# create the runtime instance
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS runtime
# add globalization support
RUN apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
WORKDIR /app
RUN mkdir bin
RUN mkdir logs
COPY --from=build /app/published .
ENTRYPOINT ["dotnet", "Nop.Web.dll"]