Skip to content

Commit 4fb6c69

Browse files
committed
Upgrade Dockerfile and global.json to .NET 10 for improved compatibility
1 parent 803e145 commit 4fb6c69

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

Mwh.Sample.Web/Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# Use the .NET 9.0 ASP.NET runtime as the base image
2-
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
1+
# Pin the .NET 10 runtime/SDK (nightly until GA) so restore supports net10.0
2+
ARG DOTNET_VERSION=10.0
3+
4+
# Use the .NET 10 ASP.NET runtime as the base image
5+
FROM mcr.microsoft.com/dotnet/nightly/aspnet:${DOTNET_VERSION} AS base
36
WORKDIR /app
47
EXPOSE 80
58
EXPOSE 443
69

7-
# Use the .NET 9.0 SDK image for building the application
8-
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
10+
# Use the .NET 10 SDK image for building the application
11+
FROM mcr.microsoft.com/dotnet/nightly/sdk:${DOTNET_VERSION} AS build
912
WORKDIR /src
1013

1114
# Set shell options for better error handling

Mwh.Sample.Web/global.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.*"
3+
"version": "10.*",
4+
"allowPrerelease": true
45
}
56
}

global.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.*"
3+
"version": "10.*",
4+
"allowPrerelease": true
45
}
56
}

0 commit comments

Comments
 (0)