Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit ba26a9c

Browse files
authored
Update 6. Production Readiness and Deployment.md
1 parent 2a95898 commit ba26a9c

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

docs/6. Production Readiness and Deployment.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ A new project is added to the solution **docker-compose.dcproj** containing the
108108

109109
A **Dockerfile** is also added to the **BackEnd** project.
110110

111-
```docker
112-
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
111+
```Dockerfile
112+
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
113113
WORKDIR /app
114114
EXPOSE 80
115115
EXPOSE 443
116116

117-
FROM microsoft/dotnet:2.1-sdk AS build
117+
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
118118
WORKDIR /src
119119
COPY ConferencePlanner.sln ./
120120
COPY BackEnd/BackEnd.csproj BackEnd/
@@ -135,13 +135,13 @@ ENTRYPOINT ["dotnet", "BackEnd.dll"]
135135

136136
Repeat the same step for the **FrontEnd** project. The Dockerfile is added to the project for it.
137137

138-
```docker
139-
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
138+
```Dockerfile
139+
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
140140
WORKDIR /app
141141
EXPOSE 80
142142
EXPOSE 443
143143

144-
FROM microsoft/dotnet:2.1-sdk AS build
144+
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
145145
WORKDIR /src
146146
COPY ConferencePlanner.sln ./
147147
COPY FrontEnd/FrontEnd.csproj FrontEnd/
@@ -162,7 +162,7 @@ ENTRYPOINT ["dotnet", "FrontEnd.dll"]
162162

163163
The **docker-compose.yml** file is updated to reflect that there are two projects to build images.
164164

165-
```docker
165+
```yaml
166166
version: '3'
167167

168168
services:
@@ -193,7 +193,7 @@ Using Docker, adding a container for SQL Server and linking the containers in th
193193

194194
Open the docker-compose.yml file and add the following entry. *Note the $ is doubled for escaping*
195195

196-
```docker
196+
```yaml
197197
db:
198198
image: "microsoft/mssql-server-linux"
199199
environment:
@@ -203,7 +203,7 @@ Open the docker-compose.yml file and add the following entry. *Note the $ is dou
203203

204204
Since the **BackEnd** application must have connectivity and cannot start until the database container is ready. Add the **depends_on** entry to the **backend** definition in the compose file.
205205

206-
```docker
206+
```yaml
207207
backend:
208208
image: backend
209209
build:
@@ -225,7 +225,7 @@ Finally, change the connection string for the database in the BackEnd\appsetting
225225

226226
In the **docker-compose.yml** file, add the **links** section to the **frontend** definition. This sets up the host name in the Docker networking allowing for the web application to call the API by name. `http://backend`
227227
228-
```docker
228+
```yaml
229229
frontend:
230230
image: frontend
231231
build:
@@ -246,7 +246,7 @@ Remove or comment out the `.UseUrls(http://localhost:56009)` in BackEnd\Program.
246246
247247
Finally open the **docker-compose.override.yml** file. Change the ports for the **backend** entry to `56009:80` and for the **frontend**, make it `5001:80`
248248

249-
```docker
249+
```yaml
250250
version: '3'
251251

252252
services:
@@ -275,13 +275,13 @@ Changes can be made to Razor pages and seen immediately without rebuilds, howeve
275275

276276
Create and ddd the following Dockerfile for the BackEnd application.
277277

278-
```docker
279-
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
278+
```Dockerfile
279+
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
280280
WORKDIR /app
281281
EXPOSE 80
282282
EXPOSE 443
283283

284-
FROM microsoft/dotnet:2.1-sdk AS build
284+
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
285285
WORKDIR /src
286286
COPY ConferencePlanner.sln ./
287287
COPY BackEnd/BackEnd.csproj BackEnd/
@@ -303,13 +303,13 @@ ENTRYPOINT ["dotnet", "BackEnd.dll"]
303303

304304
Create and ddd the following Dockerfile for the BackEnd application.
305305

306-
```docker
307-
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
306+
```Dockerfile
307+
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
308308
WORKDIR /app
309309
EXPOSE 80
310310
EXPOSE 443
311311

312-
FROM microsoft/dotnet:2.1-sdk AS build
312+
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
313313
WORKDIR /src
314314
COPY ConferencePlanner.sln ./
315315
COPY FrontEnd/FrontEnd.csproj FrontEnd/
@@ -331,7 +331,7 @@ ENTRYPOINT ["dotnet", "FrontEnd.dll"]
331331

332332
At the root of the ConferencePlanner solution, add the following **docker-compose.yml** file.
333333

334-
```docker
334+
```yaml
335335
version: '3'
336336

337337
services:

0 commit comments

Comments
 (0)