From 4a925475ce70673841d58d0d8c884beee3999d9f Mon Sep 17 00:00:00 2001 From: Mohamed Amine LEGHERABA Date: Tue, 17 Jul 2018 15:08:25 +0200 Subject: [PATCH 1/4] update dotnet data aspnet core image is depreciated need to use dotnet:2.1-sdk image to build aspnet app and dotnet:2.1-aspnetcore-runtime to run them --- compose/aspnet-mssql-compose.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compose/aspnet-mssql-compose.md b/compose/aspnet-mssql-compose.md index 36c9111b01..f203da5ebf 100644 --- a/compose/aspnet-mssql-compose.md +++ b/compose/aspnet-mssql-compose.md @@ -6,7 +6,7 @@ title: "Quickstart: Compose and ASP.NET Core with SQL Server" This quick-start guide demonstrates how to use Docker Engine on Linux and Docker Compose to set up and run the sample ASP.NET Core application using the -[ASP.NET Core Build image](https://hub.docker.com/r/microsoft/aspnetcore-build/) +[.NET Core Build image](https://hub.docker.com/r/microsoft/dotnet/) with the [SQL Server on Linux image](https://hub.docker.com/r/microsoft/mssql-server-linux/). You just need to have [Docker Engine](/install/index.md) @@ -14,7 +14,7 @@ and [Docker Compose](/compose/install/) installed on your platform of choice: Linux, Mac or Windows. For this sample, we create a sample .NET Core Web Application using the -`aspnetcore-build` Docker image. After that, we create a `Dockerfile`, +`microsoft/dotnet:2.1-sdk` Docker image. After that, we create a `Dockerfile`, configure this app to use our SQL Server database, and then create a `docker-compose.yml` that defines the behavior of all of these components. @@ -29,12 +29,12 @@ configure this app to use our SQL Server database, and then create a [Docker for Mac](/docker-for-mac/#/file-sharing), you need to set up file sharing for the volume that you need to map. -1. Within your directory, use the `aspnetcore-build` Docker image to generate a +1. Within your directory, use the `dotnet:2.1-sdk` Docker image to generate a sample web application within the container under the `/app` directory and into your host machine in the working directory: ```bash - $ docker run -v ${PWD}:/app --workdir /app microsoft/aspnetcore-build:lts dotnet new mvc --auth Individual + $ docker run -v ${PWD}:/app --workdir /app microsoft/dotnet:2.1-sdk dotnet new mvc --auth Individual ``` > **Note**: If running in Docker for Windows, make sure to use Powershell @@ -43,7 +43,7 @@ configure this app to use our SQL Server database, and then create a 1. Create a `Dockerfile` within your app directory and add the following content: ```conf - FROM microsoft/aspnetcore-build:lts + FROM microsoft/dotnet:2.1-sdk COPY . /app WORKDIR /app RUN ["dotnet", "restore"] @@ -54,7 +54,7 @@ configure this app to use our SQL Server database, and then create a ``` This file defines how to build the web app image. It uses the - [microsoft/aspnetcore-build](https://hub.docker.com/r/microsoft/aspnetcore-build/), + [microsoft/dotnet:2.1-sdk](https://hub.docker.com/r/microsoft/dotnet/), map the volume with the generated code, restore the dependencies, build the project and expose port 80. After that, it calls an `entrypoint` script that we create in the next step. From 6c1f2dfe2628c2fdd7395436107aa7296d6b5a7b Mon Sep 17 00:00:00 2001 From: Maria Bermudez Date: Wed, 19 Jun 2019 08:34:06 -0700 Subject: [PATCH 2/4] Update URLs to Microsoft images Minor edits --- compose/aspnet-mssql-compose.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compose/aspnet-mssql-compose.md b/compose/aspnet-mssql-compose.md index f203da5ebf..aba4a51eca 100644 --- a/compose/aspnet-mssql-compose.md +++ b/compose/aspnet-mssql-compose.md @@ -6,9 +6,9 @@ title: "Quickstart: Compose and ASP.NET Core with SQL Server" This quick-start guide demonstrates how to use Docker Engine on Linux and Docker Compose to set up and run the sample ASP.NET Core application using the -[.NET Core Build image](https://hub.docker.com/r/microsoft/dotnet/) +[.NET Core SDK image](hub.docker.com/_/microsoft-dotnet-core-sdk) with the -[SQL Server on Linux image](https://hub.docker.com/r/microsoft/mssql-server-linux/). +[SQL Server on Linux image](https://hub.docker.com/_/microsoft-mssql-server). You just need to have [Docker Engine](/install/index.md) and [Docker Compose](/compose/install/) installed on your platform of choice: Linux, Mac or Windows. @@ -54,9 +54,9 @@ configure this app to use our SQL Server database, and then create a ``` This file defines how to build the web app image. It uses the - [microsoft/dotnet:2.1-sdk](https://hub.docker.com/r/microsoft/dotnet/), - map the volume with the generated code, restore the dependencies, build the - project and expose port 80. After that, it calls an `entrypoint` script + [.NET Core SDK image](hub.docker.com/_/microsoft-dotnet-core-sdk), + maps the volume with the generated code, restores the dependencies, builds the + project and exposes port 80. After that, it calls an `entrypoint` script that we create in the next step. 1. The `Dockerfile` makes use of an entrypoint to your webapp Docker From 8c46d716552da1bb87a93fadd91dd9457385bb77 Mon Sep 17 00:00:00 2001 From: Adrian Plata <51415348+adrian-plata@users.noreply.github.com> Date: Thu, 20 Jun 2019 10:53:49 -0700 Subject: [PATCH 3/4] Adding a note on possible version errors --- compose/aspnet-mssql-compose.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compose/aspnet-mssql-compose.md b/compose/aspnet-mssql-compose.md index 4a0f308035..0276dc41e1 100644 --- a/compose/aspnet-mssql-compose.md +++ b/compose/aspnet-mssql-compose.md @@ -112,6 +112,9 @@ configure this app to use our SQL Server database, and then create a This file defines the `web` and `db` micro-services, their relationship, the ports they are using, and their specific environment variables. + + > **Note**: You may receive an error if you choose the wrong Compose file + > version. Be sure to choose a verison that is compatible with system. 1. Go to `Startup.cs` and locate the function called `ConfigureServices` (Hint: it should be under line 42). Replace the entire function to use the following From f2f41723fbbf7a5b2f4ff93f1356aee7350562c2 Mon Sep 17 00:00:00 2001 From: Adrian Plata <51415348+adrian-plata@users.noreply.github.com> Date: Thu, 20 Jun 2019 10:54:27 -0700 Subject: [PATCH 4/4] fixing missing word --- compose/aspnet-mssql-compose.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/aspnet-mssql-compose.md b/compose/aspnet-mssql-compose.md index 0276dc41e1..e3ab46a321 100644 --- a/compose/aspnet-mssql-compose.md +++ b/compose/aspnet-mssql-compose.md @@ -114,7 +114,7 @@ configure this app to use our SQL Server database, and then create a ports they are using, and their specific environment variables. > **Note**: You may receive an error if you choose the wrong Compose file - > version. Be sure to choose a verison that is compatible with system. + > version. Be sure to choose a verison that is compatible with your system. 1. Go to `Startup.cs` and locate the function called `ConfigureServices` (Hint: it should be under line 42). Replace the entire function to use the following