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
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
As we did with the method iterator, we can refactor the code from this example to perform the validation before calling the asynchronous method. As the output from the following example shows, the <xref:System.ArgumentOutOfRangeException> is not wrapped in a <x:System.AggregateException>.
71
+
As we did with the method iterator, we can refactor the code from this example to perform the validation before calling the asynchronous method. As the output from the following example shows, the <xref:System.ArgumentOutOfRangeException> is not wrapped in a <xref:System.AggregateException>.
Copy file name to clipboardExpand all lines: docs/framework/data/adonet/connection-strings-and-configuration-files.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,8 +130,8 @@ Embedding connection strings in your application's code can lead to security vul
130
130
131
131
|Provider|Description|
132
132
|--------------|-----------------|
133
-
|<!--zz<xref:System.Configuration.RSAProtectedConfigurationProvider>-->`System.Configuration.RSAProtectedConfigurationProvider`|Uses the RSA encryption algorithm to encrypt and decrypt data. The RSA algorithm can be used for both public key encryption and digital signatures. It is also known as "public key" or asymmetrical encryption because it employs two different keys. You can use the [ASP.NET IIS Registration Tool (Aspnet_regiis.exe)](http://msdn.microsoft.com/library/6491c41e-e2b0-481f-9863-db3614d5f96b) to encrypt sections in a Web.config file and manage the encryption keys. ASP.NET decrypts the configuration file when it processes the file. The identity of the ASP.NET application must have read access to the encryption key that is used to encrypt and decrypt the encrypted sections.|
134
-
|<!--zz<xref:System.Configuration.DPAPIProtectedConfigurationProvider>-->`System.Configuration.DPAPIProtectedConfigurationProvider`|Uses the Windows Data Protection API (DPAPI) to encrypt configuration sections. It uses the Windows built-in cryptographic services and can be configured for either machine-specific or user-account-specific protection. Machine-specific protection is useful for multiple applications on the same server that need to share information. User-account-specific protection can be used with services that run with a specific user identity, such as a shared hosting environment. Each application runs under a separate identity which restricts access to resources such as files and databases.|
133
+
|<xref:System.Configuration.RsaProtectedConfigurationProvider>|Uses the RSA encryption algorithm to encrypt and decrypt data. The RSA algorithm can be used for both public key encryption and digital signatures. It is also known as "public key" or asymmetrical encryption because it employs two different keys. You can use the [ASP.NET IIS Registration Tool (Aspnet_regiis.exe)](http://msdn.microsoft.com/library/6491c41e-e2b0-481f-9863-db3614d5f96b) to encrypt sections in a Web.config file and manage the encryption keys. ASP.NET decrypts the configuration file when it processes the file. The identity of the ASP.NET application must have read access to the encryption key that is used to encrypt and decrypt the encrypted sections.|
134
+
|<xref:System.Configuration.DpapiProtectedConfigurationProvider>|Uses the Windows Data Protection API (DPAPI) to encrypt configuration sections. It uses the Windows built-in cryptographic services and can be configured for either machine-specific or user-account-specific protection. Machine-specific protection is useful for multiple applications on the same server that need to share information. User-account-specific protection can be used with services that run with a specific user identity, such as a shared hosting environment. Each application runs under a separate identity which restricts access to resources such as files and databases.|
135
135
136
136
Both providers offer strong encryption of data. However, if you are planning to use the same encrypted configuration file on multiple servers, such as a Web farm, only the `RsaProtectedConfigurationProvider` enables you to export the encryption keys used to encrypt the data and import them on another server. For more information, see [Importing and Exporting Protected Configuration RSA Key Containers](http://msdn.microsoft.com/library/f3022b39-f17f-48c1-b067-025eab0ce8bc).
0 commit comments