-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 765 Bytes
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 765 Bytes
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
#
# build stage
#
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /authzyin
# copy csproj and restore as distinct layers to use build cache
COPY authzyin.sln .
COPY lib/lib.csproj lib/
COPY sample/sample.csproj sample/
COPY test/test.csproj test/
RUN dotnet restore
# copy everything else and build app
# we are skiping SPA in this image. SPA is handled by a different docker image with nginx.
# check sample.csproj for how SkipSPA is defined.
COPY lib/ lib/
COPY sample/ sample/
WORKDIR /authzyin/sample
RUN dotnet publish -c Release /p:SkipSPA=true
#
# runtime stage
#
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine
COPY --from=build /authzyin/sample/bin/Release/netcoreapp3.1/publish/ App/
WORKDIR /App
ENTRYPOINT ["dotnet", "sample.dll"]