Skip to content

Commit 0def6eb

Browse files
committed
dockerfile
2 parents 9f52f98 + adfffea commit 0def6eb

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/dotnet-deploy-4.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: .NET CI_wtomaz808
33
env:
44
registryName: onfp77x2viod4.azurecr.io
55
repositoryName: techexcel/dotnetcoreapp
6-
dockerFolderPath: ./src/Application/src/RazorPagesTestSample
6+
dockerFolderPath: ./solution/mysolutions
77
tag: ${{github.run_number}}
88

99
on:

Solution/mysolutions/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
2+
WORKDIR /app
3+
4+
# Copy csproj and restore as distinct layers
5+
COPY *.csproj ./
6+
RUN dotnet restore
7+
8+
# Copy everything else and build
9+
COPY . ./
10+
RUN dotnet publish -c Release -o out
11+
12+
# Build runtime image
13+
FROM mcr.microsoft.com/dotnet/aspnet:8.0
14+
WORKDIR /app
15+
COPY --from=build-env /app/out .
16+
# Default ASP.NET port changed with .NET 8.0
17+
ENV ASPNETCORE_HTTP_PORTS=80
18+
ENTRYPOINT ["dotnet", "RazorPagesTestSample.dll"]

0 commit comments

Comments
 (0)