forked from TrevorDArcyEvans/NeoGeoSolver.NET
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (19 loc) · 793 Bytes
/
Dockerfile
File metadata and controls
22 lines (19 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /source
EXPOSE 80
# copy csproj and restore as distinct layers
COPY *.sln .
COPY NeoGeoSolver.NET/NeoGeoSolver.NET.csproj ./NeoGeoSolver.NET/NeoGeoSolver.NET.csproj
COPY NeoGeoSolver.NET.Tests/NeoGeoSolver.NET.Tests.csproj ./NeoGeoSolver.NET.Tests/NeoGeoSolver.NET.Tests.csproj
COPY NeoGeoSolver.NET.UI.Web/NeoGeoSolver.NET.UI.Web.csproj ./NeoGeoSolver.NET.UI.Web/NeoGeoSolver.NET.UI.Web.csproj
RUN dotnet restore
# copy everything else and build app
COPY . .
WORKDIR /source/NeoGeoSolver.NET.UI.Web
RUN dotnet publish -c release -o /app
# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app
COPY --from=build /app ./
ENTRYPOINT ["dotnet", "NeoGeoSolver.NET.UI.Web.dll"]