Merge pull request #7033 from spboyer/patch-1

Update dotnetcore instructions
This commit is contained in:
Tammy Fox 2018-07-17 18:48:11 -04:00 committed by GitHub
commit 8b1eb8ad0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

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. the `Dockerfile` to use the DLL file of your project.
```dockerfile ```dockerfile
FROM microsoft/aspnetcore-build:2.0 AS build-env FROM microsoft/dotnet:sdk AS build-env
WORKDIR /app WORKDIR /app
# Copy csproj and restore as distinct layers # Copy csproj and restore as distinct layers
@ -53,7 +53,7 @@ COPY . ./
RUN dotnet publish -c Release -o out RUN dotnet publish -c Release -o out
# Build runtime image # Build runtime image
FROM microsoft/aspnetcore:2.0 FROM microsoft/dotnet:aspnetcore-runtime
WORKDIR /app WORKDIR /app
COPY --from=build-env /app/out . COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "aspnetapp.dll"] ENTRYPOINT ["dotnet", "aspnetapp.dll"]
@ -96,7 +96,6 @@ $ docker run -d -p 8080:80 --name myapp aspnetapp
## Further reading ## Further reading
- [ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/) - [ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/)
- [Microsoft ASP.NET Core on Docker - [Microsoft ASP.NET Core on Docker Hub](https://hub.docker.com/r/microsoft/dotnet/)
Hub](https://hub.docker.com/r/microsoft/aspnetcore/) - [Building Docker Images for .NET Core Applications](https://docs.microsoft.com/dotnet/core/docker/building-net-docker-images)
- [ASP.NET Core with Docker Tools for Visual - [Docker Tools for Visual Studio](https://docs.microsoft.com/dotnet/articles/core/docker/visual-studio-tools-for-docker)
Studio](https://blogs.msdn.microsoft.com/webdev/2016/11/16/new-docker-tools-for-visual-studio/)