From 2929492c0c1bb0b4474d6dc536fccda660d725d5 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Mon, 12 Apr 2021 14:46:57 +0800 Subject: [PATCH] update the image source * the image source is changed * upgrade to 5.0 --- engine/examples/dotnetcore.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/examples/dotnetcore.md b/engine/examples/dotnetcore.md index 58f168ac6e..31fcea55c3 100644 --- a/engine/examples/dotnetcore.md +++ b/engine/examples/dotnetcore.md @@ -44,7 +44,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:3.1 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env WORKDIR /app # Copy csproj and restore as distinct layers @@ -56,7 +56,7 @@ COPY . ./ RUN dotnet publish -c Release -o out # Build runtime image -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 +FROM mcr.microsoft.com/dotnet/aspnet:3.1 WORKDIR /app COPY --from=build-env /app/out . ENTRYPOINT ["dotnet", "aspnetapp.dll"] @@ -86,7 +86,7 @@ obj/ This method is preferred for CI tools like Jenkins, Azure DevOps, GitLab CI, etc. as you can use the same artifacts in multiple deployment models if Docker isn't the only deployment model being used. Additionally, you'll be able to run unit tests and publish code coverage reports, or use custom plugins on the artifacts built by the CI. ```dockerfile - FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 + FROM mcr.microsoft.com/dotnet/aspnet:5.0 COPY bin/Release/netcoreapp3.1/publish/ App/ WORKDIR /App ENTRYPOINT ["dotnet", "aspnetapp.dll"] @@ -122,6 +122,6 @@ $ docker run -d -p 8080:80 --name myapp aspnetapp ## Further reading - [ASP.NET Core](https://docs.microsoft.com/aspnet/core/) - - [Microsoft ASP.NET Core on Docker Hub](https://hub.docker.com/r/microsoft/dotnet/) + - [Microsoft ASP.NET Core on Docker Hub](https://hub.docker.com/_/microsoft-dotnet-sdk/) - [Building Docker Images for ASP.NET Core](https://docs.microsoft.com/aspnet/core/host-and-deploy/docker/building-net-docker-images) - [Docker Tools for Visual Studio](https://docs.microsoft.com/dotnet/articles/core/docker/visual-studio-tools-for-docker)