-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (17 loc) · 898 Bytes
/
Dockerfile
File metadata and controls
24 lines (17 loc) · 898 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
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
COPY ExampleIdentity.Api/ExampleIdentity.Api.csproj ExampleIdentity.Api/ExampleIdentity.Api.csproj
COPY ExampleIdentity.Application/ExampleIdentity.Application.csproj ExampleIdentity.Application/ExampleIdentity.Application.csproj
COPY ExampleIdentity.Core/ExampleIdentity.Core.csproj ExampleIdentity.Core/ExampleIdentity.Core.csproj
COPY ExampleIdentity.Infrastructure/ExampleIdentity.Infrastructure.csproj ExampleIdentity.Infrastructure/ExampleIdentity.Infrastructure.csproj
RUN dotnet restore ExampleIdentity.Api
COPY . .
RUN dotnet publish ExampleIdentity.Api -c release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
COPY --from=build /app/out .
ARG BUILD_VERSION
ENV BUILD_VERSION $BUILD_VERSION
ENV ASPNETCORE_URLS=http://+:5010
ENV ASPNETCORE_URLS=http://+:5011
ENTRYPOINT ["dotnet", "ExampleIdentity.Api.dll"]