You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> DHI runtime images already run as a non-root user (`nonroot`, UID 65532), so there's no need to create a user or specify `USER` in your Dockerfile. This reduces the attack surface and simplifies your configuration.
107
107
108
108
{{< /tab >}}
109
-
{{< tab name="Using the official .NET image" >}}
109
+
{{< tab name="Using the official .NET 10 image" >}}
110
110
111
111
You can use `docker init` to create the necessary Docker assets. Inside the `docker-dotnet-sample` directory, run the `docker init` command in a terminal. `docker init` provides some default configuration, but you'll need to answer a few questions about your application. Refer to the following example to answer the prompts from `docker init` and use the same answers for your prompts.
112
112
@@ -124,23 +124,23 @@ Let's get started!
124
124
125
125
? What application platform does your project use? ASP.NET Core
126
126
? What's the name of your solution's main project? myWebApp
127
-
? What version of .NET do you want to use? 8.0
127
+
? What version of .NET do you want to use? 10.0
128
128
? What local port do you want to use to access your server? 8080
129
129
```
130
130
131
-
This generates a Dockerfile using the official .NET 8 images from Microsoft Container Registry:
131
+
This generates a Dockerfile using the official .NET 10 images from Microsoft Container Registry:
132
132
133
133
```dockerfile {title=Dockerfile}
134
134
# syntax=docker/dockerfile:1
135
135
136
-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
136
+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
137
137
ARG TARGETARCH
138
138
COPY . /source
139
139
WORKDIR /source/src
140
140
RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \
141
141
dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app
142
142
143
-
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
143
+
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
0 commit comments