-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (24 loc) · 1.57 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
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1.0-alpine3.10 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.100 AS build
WORKDIR /src
COPY ["SIGO.RegulatoryNorms.API/SIGO.RegulatoryNorms.API.csproj", "SIGO.RegulatoryNorms.API/"]
COPY ["SIGO.RegulatoryNorms.Application.Services/SIGO.RegulatoryNorms.Application.Services.csproj", "SIGO.RegulatoryNorms.Application.Services/"]
COPY ["SIGO.RegulatoryNorms.DataContract/SIGO.RegulatoryNorms.DataContracts.csproj", "SIGO.RegulatoryNorms.DataContracts/"]
COPY ["SIGO.RegulatoryNorms.Infrastructure.CrossCutting/SIGO.RegulatoryNorms.Infrastructure.CrossCutting.csproj", "SIGO.RegulatoryNorms.Infrastructure.CrossCutting/"]
RUN dotnet restore "SIGO.RegulatoryNorms.API/SIGO.RegulatoryNorms.API.csproj"
COPY . .
WORKDIR "/src/SIGO.RegulatoryNorms.API"
RUN dotnet build "SIGO.RegulatoryNorms.API.csproj" -c Release -o /app/build -r alpine-x64
FROM build AS publish
RUN dotnet publish "SIGO.RegulatoryNorms.API.csproj" -c Release -o /app/publish -r alpine-x64
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "SIGO.RegulatoryNorms.API.dll"]
#CMD dotnet SIGO.RegulatoryNorms.API.dll