Skip to content

Commit b2d4bbb

Browse files
mirsaeediJRAlexander
authored andcommitted
Required changes based on the new dotnet-docker repo (#5724)
* Required changes based on the new dotnet-docker repo Since with the release of dotnet 2.1, Microsoft decided to move it's docker samples to a new repo, some changes are required to reflect this new decision. 1. links 2. versions (dotnet, docker, docker images) 3. instructions * Update building-net-docker-images.md
1 parent c4a8f3a commit b2d4bbb

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

docs/core/docker/building-net-docker-images.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ When multiple applications use common images on the same machine, memory is shar
5252

5353
To achieve the goals above, we provide image variants under [`microsoft/dotnet`](https://hub.docker.com/r/microsoft/dotnet/).
5454

55-
* `microsoft/dotnet:<version>-sdk`(`microsoft/dotnet:2.0.0-sdk`) This image contains the .NET Core SDK, which includes the .NET Core and Command Line Tools (CLI). This image maps to the **development scenario**. You use this image for local development, debugging, and unit testing. This image can also be used for your **build** scenarios. Using `microsoft/dotnet:sdk` always gives you the latest version.
55+
* `microsoft/dotnet:<version>-sdk`(`microsoft/dotnet:2.1-sdk`) This image contains the .NET Core SDK, which includes the .NET Core and Command Line Tools (CLI). This image maps to the **development scenario**. You use this image for local development, debugging, and unit testing. This image can also be used for your **build** scenarios. Using `microsoft/dotnet:sdk` always gives you the latest version.
5656

5757
> [!TIP]
5858
> If you are unsure about your needs, you want to use the `microsoft/dotnet:<version>-sdk` image. As the "de facto" image, it's designed to be used as a throw away container (mount your source code and start the container to start your app), and as the base image to build other images from.
@@ -74,9 +74,9 @@ Latest versions of each variant:
7474

7575
## Samples to explore
7676

77-
* [This ASP.NET Core Docker sample](https://github.com/dotnet/dotnet-docker-samples/tree/master/aspnetapp) demonstrates a best practice pattern for building Docker images for ASP.NET Core apps for production. The sample works with both Linux and Windows containers.
77+
* [This ASP.NET Core Docker sample](https://github.com/dotnet/dotnet-docker/tree/master/samples/aspnetapp) demonstrates a best practice pattern for building Docker images for ASP.NET Core apps for production. The sample works with both Linux and Windows containers.
7878

79-
* This .NET Core Docker sample demonstrates a best practice pattern for [building Docker images for .NET Core apps for production.](https://github.com/dotnet/dotnet-docker-samples/tree/master/dotnetapp-prod)
79+
* This .NET Core Docker sample demonstrates a best practice pattern for [building Docker images for .NET Core apps for production.](https://github.com/dotnet/dotnet-docker/tree/master/samples/dotnetapp)
8080

8181
## Your first ASP.NET Core Docker app
8282

@@ -96,9 +96,9 @@ It uses the [Docker multi-stage build feature](https://docs.docker.com/engine/us
9696

9797
To build and run, install the following items:
9898

99-
#### .NET Core 2.0 SDK
99+
#### .NET Core 2.1 SDK
100100

101-
* Install [.NET Core SDK 2.0](https://www.microsoft.com/net/core).
101+
* Install [.NET Core SDK 2.1](https://www.microsoft.com/net/core).
102102

103103
* Install your favorite code editor, if you haven't already.
104104

@@ -107,7 +107,7 @@ To build and run, install the following items:
107107
108108
#### Installing Docker Client
109109

110-
Install [Docker 17.06](https://docs.docker.com/release-notes/docker-ce/) or later of the Docker client.
110+
Install [Docker 18.03](https://docs.docker.com/release-notes/docker-ce/) or later of the Docker client.
111111

112112
The Docker client can be installed in:
113113

@@ -131,22 +131,26 @@ The Docker client can be installed in:
131131

132132
### Getting the sample application
133133

134-
The easiest way to get the sample is by cloning the [samples repository](https://github.com/dotnet/dotnet-docker-samples) with git, using the following instructions:
134+
The easiest way to get the sample is by cloning the [.NET Core Docker repository](https://github.com/dotnet/dotnet-docker) with git, using the following instructions:
135135

136136
```console
137-
git clone https://github.com/dotnet/dotnet-docker-samples/
137+
git clone https://github.com/dotnet/dotnet-docker
138138
```
139139

140-
You can also download the repository (it is small) as a zip from the .NET Core Docker samples repository.
140+
You can also download the repository (it is small) as a zip from the .NET Core Docker repository.
141141

142142
### Run the ASP.NET app locally
143143

144144
For a reference point, before we containerize the application, first run the application locally.
145145

146-
You can build and run the application locally with the .NET Core 2.0 SDK using the following commands (The instructions assume the root of the repository):
146+
You can build and run the application locally with the .NET Core 2.1 SDK using the following commands (The instructions assume the root of the repository):
147147

148148
```console
149-
cd aspnetapp
149+
cd dotnet-docker
150+
cd samples
151+
cd aspnetapp // solution scope where the dockerfile is located
152+
cd aspnetapp // project scope
153+
150154
dotnet run
151155
```
152156

@@ -157,7 +161,10 @@ After the application starts, visit **http://localhost:5000** in your web browse
157161
You can build and run the sample in Docker using Linux containers using the following commands (The instructions assume the root of the repository):
158162

159163
```console
160-
cd aspnetapp
164+
cd dotnet-docker
165+
cd samples
166+
cd aspnetapp // solution scope where the dockerfile is located
167+
161168
docker build -t aspnetapp .
162169
docker run -it --rm -p 5000:80 --name aspnetcore_sample aspnetapp
163170
```
@@ -172,7 +179,10 @@ After the application starts, visit **http://localhost:5000** in your web browse
172179
You can build and run the sample in Docker using Windows containers using the following commands (The instructions assume the root of the repository):
173180

174181
```console
175-
cd aspnetapp
182+
cd dotnet-docker
183+
cd samples
184+
cd aspnetapp // solution scope where the dockerfile is located
185+
176186
docker build -t aspnetapp .
177187
docker run -it --rm --name aspnetcore_sample aspnetapp
178188
```
@@ -230,10 +240,10 @@ dotnet published/aspnetapp.dll
230240

231241
### Docker Images used in this sample
232242

233-
The following Docker images are used in this sample
243+
The following Docker images are used in this sample's dockerfile.
234244

235-
* `microsoft/aspnetcore-build:2.0`
236-
* `microsoft/aspnetcore:2.0`
245+
* `microsoft/dotnet:2.1-sdk`
246+
* `microsoft/dotnet:2.1-aspnetcore-runtime`
237247

238248
Congratulations! you have just:
239249
> [!div class="checklist"]

0 commit comments

Comments
 (0)