Update from microsoft/* to mcr.microsoft.com/*. (#8738)

Update Dockerfile with following changes:
1. Switch .NET Core Images from legacy location at Docker Hub Registry (microsoft/*) to a new location at Microsoft Container Registry (mcr.microsoft.com/*).
2. Since Microsoft no longer supports the tag 'latest', I must set a specific version of '2.2' (current), which is the most recent stable release.
This commit is contained in:
Oleg Burov
2019-06-06 04:46:26 -07:00
committed by paigehargrave
parent 58ae6fb04b
commit 4a7c0efb09

View File

@@ -41,7 +41,7 @@ Windows](/docker-for-windows/). Read more on [switching containers](/docker-for-
the `Dockerfile` to use the DLL file of your project.
```dockerfile
FROM microsoft/dotnet:sdk AS build-env
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
@@ -53,7 +53,7 @@ COPY . ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM microsoft/dotnet:aspnetcore-runtime
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "aspnetapp.dll"]