-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 963 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
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env
WORKDIR /app
EXPOSE 80
COPY UserService.Core/*.csproj ./UserService.Core/
COPY UserService.Data/*.csproj ./UserService.Data/
COPY UserService.Features/*.csproj ./UserService.Features/
COPY UserService.WebHost/*.csproj ./UserService.WebHost/
COPY UserService.Test.Unit/*.csproj ./UserService.Test.Unit/
WORKDIR /app/UserService.WebHost
RUN dotnet restore
WORKDIR /app
COPY UserService.Core/ ./UserService.Core/
COPY UserService.Data/ ./UserService.Data/
COPY UserService.Features/ ./UserService.Features/
COPY UserService.WebHost/ ./UserService.WebHost/
COPY UserService.Test.Unit/ ./UserService.Test.Unit/
WORKDIR /app/UserService.WebHost
RUN dotnet publish /property:PublishWithAspNetCoreTargetManifest=false -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
WORKDIR /app
COPY --from=build-env /app/UserService.WebHost/out ./
ENTRYPOINT ["dotnet", "UserService.WebHost.dll"]