You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: docs/core/docker/building-net-docker-images.md
+26-16Lines changed: 26 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ When multiple applications use common images on the same machine, memory is shar
52
52
53
53
To achieve the goals above, we provide image variants under [`microsoft/dotnet`](https://hub.docker.com/r/microsoft/dotnet/).
54
54
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.
56
56
57
57
> [!TIP]
58
58
> 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:
74
74
75
75
## Samples to explore
76
76
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.
78
78
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)
80
80
81
81
## Your first ASP.NET Core Docker app
82
82
@@ -96,9 +96,9 @@ It uses the [Docker multi-stage build feature](https://docs.docker.com/engine/us
* Install your favorite code editor, if you haven't already.
104
104
@@ -107,7 +107,7 @@ To build and run, install the following items:
107
107
108
108
#### Installing Docker Client
109
109
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.
111
111
112
112
The Docker client can be installed in:
113
113
@@ -131,22 +131,26 @@ The Docker client can be installed in:
131
131
132
132
### Getting the sample application
133
133
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:
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.
141
141
142
142
### Run the ASP.NET app locally
143
143
144
144
For a reference point, before we containerize the application, first run the application locally.
145
145
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):
147
147
148
148
```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
+
150
154
dotnet run
151
155
```
152
156
@@ -157,7 +161,10 @@ After the application starts, visit **http://localhost:5000** in your web browse
157
161
You can build and run the sample in Docker using Linux containers using the following commands (The instructions assume the root of the repository):
158
162
159
163
```console
160
-
cd aspnetapp
164
+
cd dotnet-docker
165
+
cd samples
166
+
cd aspnetapp // solution scope where the dockerfile is located
167
+
161
168
docker build -t aspnetapp .
162
169
docker run -it --rm -p 5000:80 --name aspnetcore_sample aspnetapp
163
170
```
@@ -172,7 +179,10 @@ After the application starts, visit **http://localhost:5000** in your web browse
172
179
You can build and run the sample in Docker using Windows containers using the following commands (The instructions assume the root of the repository):
173
180
174
181
```console
175
-
cd aspnetapp
182
+
cd dotnet-docker
183
+
cd samples
184
+
cd aspnetapp // solution scope where the dockerfile is located
185
+
176
186
docker build -t aspnetapp .
177
187
docker run -it --rm --name aspnetcore_sample aspnetapp
0 commit comments