-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (25 loc) · 1.16 KB
/
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 node:10.14.0 as node
WORKDIR /root/src/app/ui
COPY ./src/Monitoring.Client/package*.json ./
RUN npm install
RUN npm install -g @angular/[email protected]
COPY ./src/Monitoring.Client/ .
RUN ng build --prod --aot --extract-licenses false
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as builder
RUN mkdir -p /root/src/app/api
WORKDIR /root/src/app/api
COPY ./src/Monitoring.Web/Monitoring.Api/Monitoring.Api.csproj ./Monitoring.Api/Monitoring.Api.csproj
COPY ./src/Monitoring.Web/Monitoring.Business/Monitoring.Business.csproj ./Monitoring.Business/Monitoring.Business.csproj
COPY ./src/Monitoring.Web/Monitoring.Data/Monitoring.Data.csproj ./Monitoring.Data/Monitoring.Data.csproj
RUN dotnet restore ./Monitoring.Api/Monitoring.Api.csproj
COPY ./src/Monitoring.Web/ .
RUN dotnet publish ./Monitoring.Api/Monitoring.Api.csproj -c release -o ./published
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /root/
COPY --from=builder /root/src/app/api/published .
COPY --from=node /root/src/app/ui/dist/client/ ./wwwroot
ENV ConnectionStrings__Monitoring=""
ENV ASPNETCORE_ENVIRONMENT=production
ENV ASPNETCORE_URLS=http://+:5000
EXPOSE 5000/tcp
CMD ["dotnet", "./Monitoring.Api.dll"]