mirror of https://github.com/docker/docs.git
Updated dotnet core images in DOCKERFILE (#10629)
Since dotnet core 2.2 is out of support I would propose to update script to latest LTS dotnet core version.
This commit is contained in:
parent
9ec7d50eea
commit
97b03523fd
|
@ -42,7 +42,7 @@ tutorial](https://www.asp.net/get-started) to initialize a project or clone our
|
|||
the `Dockerfile` to use the DLL file of your project.
|
||||
|
||||
```dockerfile
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
|
||||
WORKDIR /app
|
||||
|
||||
# Copy csproj and restore as distinct layers
|
||||
|
@ -54,7 +54,7 @@ COPY . ./
|
|||
RUN dotnet publish -c Release -o out
|
||||
|
||||
# Build runtime image
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
|
||||
WORKDIR /app
|
||||
COPY --from=build-env /app/out .
|
||||
ENTRYPOINT ["dotnet", "aspnetapp.dll"]
|
||||
|
|
Loading…
Reference in New Issue