-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (24 loc) · 899 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
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /app
# copy csproj and restore as distinct layers
COPY *.sln .
COPY Events/Events.csproj ./Events/
COPY StrangeVanilla.Blogging.Events/StrangeVanilla.Blogging.Events.csproj ./StrangeVanilla.Blogging.Events/
COPY Migrations/Migrations.csproj ./Migrations/
COPY Users/Users.csproj ./Users/
COPY SimpleRepo/SimpleRepo.csproj ./SimpleRepo/
COPY SV.Maat/SV.Maat.csproj ./SV.Maat/
RUN dotnet restore
# copy everything else and build app
COPY Events/. ./Events/
COPY StrangeVanilla.Blogging.Events/. ./StrangeVanilla.Blogging.Events/
COPY Migrations/. ./Migrations/
COPY Users/. ./Users/
COPY SimpleRepo/. ./SimpleRepo/
COPY SV.Maat/. ./SV.Maat/
WORKDIR /app
RUN dotnet publish SV.Maat -c Release -o out
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS runtime
WORKDIR /app
COPY --from=build /app/out ./
ENTRYPOINT ["dotnet", "SV.Maat.dll"]