-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (23 loc) · 1003 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
34
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS net-build
WORKDIR /source
COPY /WebArticleLibrary.Model/WebArticleLibrary.Model.csproj ./WebArticleLibrary.Model/
RUN dotnet restore ./WebArticleLibrary.Model/WebArticleLibrary.Model.csproj
COPY /WebArticleLibrary.Model ./WebArticleLibrary.Model
COPY /WebArticleLibrary/WebArticleLibrary.csproj ./WebArticleLibrary/
RUN dotnet restore ./WebArticleLibrary/WebArticleLibrary.csproj
COPY /WebArticleLibrary ./WebArticleLibrary
RUN dotnet publish ./WebArticleLibrary -c release -o /app
FROM node:8.11 AS node-build
WORKDIR /app
COPY /WebArticleLibrary/*.json ./WebArticleLibrary/
COPY /WebArticleLibrary/wwwroot ./WebArticleLibrary/wwwroot/
RUN cd ./WebArticleLibrary && npm install
RUN npm install -g typescript
RUN tsc --build ./WebArticleLibrary/tsconfig.json
FROM mcr.microsoft.com/dotnet/core/sdk:2.2
WORKDIR /app
COPY 1.pfx ./
COPY --from=net-build /app .
COPY --from=node-build /app .
EXPOSE 5443
ENTRYPOINT ["dotnet", "WebArticleLibrary.dll"]