Skip to content

Commit 0ea732d

Browse files
authored
Updating nanoserver Dockerfile (#1092)
1 parent 0042012 commit 0ea732d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Dockerfile.nanoserver

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG TAG=ltsc2022
1+
ARG TAG=ltsc2025
22
FROM mcr.microsoft.com/dotnet/sdk:9.0-nanoserver-$TAG AS build
33

44
WORKDIR /source
@@ -7,11 +7,10 @@ WORKDIR /source
77
COPY . .
88
WORKDIR /source/main/GarnetServer
99

10-
RUN dotnet restore
11-
RUN dotnet build -c Release -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false
12-
13-
# Copy and publish app and libraries
14-
RUN dotnet publish -c Release -o /app -r win-x64 --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false
10+
# Restore, build, and publish
11+
RUN dotnet restore && \
12+
dotnet build -c Release -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false && \
13+
dotnet publish -c Release -o /app -r win-x64 --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false
1514

1615
# Final stage/image
1716
FROM mcr.microsoft.com/dotnet/runtime:8.0-nanoserver-$TAG AS runtime

0 commit comments

Comments
 (0)