-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
26 lines (23 loc) · 1001 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
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
# Fetch deps
COPY EnoLandingPage.sln EnoLandingPage.sln
COPY EnoLandingPageBackend/EnoLandingPageBackend.csproj EnoLandingPageBackend/EnoLandingPageBackend.csproj
COPY EnoLandingPageCore/EnoLandingPageCore.csproj EnoLandingPageCore/EnoLandingPageCore.csproj
COPY EnoLandingPageFrontend/EnoLandingPageFrontend.csproj EnoLandingPageFrontend/EnoLandingPageFrontend.csproj
RUN dotnet restore
# Publish
COPY EnoLandingPageBackend EnoLandingPageBackend
COPY EnoLandingPageCore EnoLandingPageCore
COPY EnoLandingPageFrontend EnoLandingPageFrontend
COPY Directory.Build.props Directory.Build.props
COPY ENOWARS.ruleset ENOWARS.ruleset
COPY stylecop.json stylecop.json
RUN dotnet publish -c Release -o /app
# Copy to runtime container
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
EXPOSE 80
COPY --from=build /app .
COPY EnoLandingPageBackend/appsettings.json .
ENTRYPOINT ["dotnet", "EnoLandingPageBackend.dll"]