-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.web
42 lines (32 loc) · 1.67 KB
/
Dockerfile.web
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
35
36
37
38
39
40
41
42
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
# copy csproj and restore as distinct layers
COPY *.sln .
COPY DomainLogic/*.csproj ./DomainLogic/
COPY Implementations.MassTransitMq/*.csproj ./Implementations.MassTransitMq/
COPY Implementations.RepositoriesEF/*.csproj ./Implementations.RepositoriesEF/
COPY Implementations.RepositoriesMongoDB/*.csproj ./Implementations.RepositoriesMongoDB/
COPY BotWorkerService/*.csproj ./BotWorkerService/
COPY Implementations.Mq/*.csproj ./Implementations.Mq/
COPY Implementations.Repositories/*.csproj ./Implementations.Repositories/
COPY Implementations.ArtificialGameAnalyzerRandom/*.csproj ./Implementations.ArtificialGameAnalyzerRandom/
COPY Implementations.GameServiceHttpClient/*.csproj ./Implementations.GameServiceHttpClient/
COPY RestApi/*.csproj ./RestApi/
RUN dotnet restore
# copy everything else and build app
COPY DomainLogic/. ./DomainLogic/
COPY Implementations.MassTransitMq/. ./Implementations.MassTransitMq/
COPY Implementations.RepositoriesEF/. ./Implementations.RepositoriesEF/
COPY Implementations.RepositoriesMongoDB/. ./Implementations.RepositoriesMongoDB/
COPY BotWorkerService/. ./BotWorkerService/
COPY Implementations.Mq/. ./Implementations.Mq/
COPY Implementations.Repositories/. ./Implementations.Repositories/
COPY Implementations.ArtificialGameAnalyzerRandom/. ./Implementations.ArtificialGameAnalyzerRandom/
COPY Implementations.GameServiceHttpClient/. ./Implementations.GameServiceHttpClient/
COPY RestApi/. ./RestApi/
WORKDIR /app/RestApi
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
WORKDIR /app
COPY --from=build /app/RestApi/out ./
ENTRYPOINT ["dotnet", "RestApi.dll"]