3.3.1. A Bit of Clarification ...................................................................................... 9

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

1. INTRODUCTION ..........................................................................

1.1 So, What’s the Point? ...................................................................................... 1

1.2 The Technology Stack ...................................................................................... 1

1.3 Standing Out From The Crowd ......................................................................... 2

2. PREPARING THE APPLICATION ................................................... 3

2.1 Modifying the launchSetting.json File .............................................................. 3

2.2 Switching to an In-Memory Database .............................................................. 3

2.3 Adding a Test Project and a Unit Test .............................................................. 4

3. THE DOCKER CLI THROUGH EXAMPLES ....................................... 7

3.1 Short Intro to Docker on Windows .................................................................. 7

3.2 Why Docker? ................................................................................................... 8

3.3 Scenario One: Using Docker to Keep Local Environments Clean ...................... 8
3.3.1. A Bit of Clarification ...................................................................................... 9

3.4 Scenario Two: Using Docker to Test Your App in a Clean Environment .......... 10

3.5 Scenario Three: Persisting the Changes and Cross-Platform Development .... 12

3.6 Creating the Image and Pushing It to Docker Hub ........................................ 12

4. DOCKERIZING ASP.NET CORE APP ............................................ 16

4.1 Creating a Dockerfile ..................................................................................... 16


4.1.1. A Bit of Explanation ..................................................................................... 16

4.2 Creating a .dockerignore File ......................................................................... 17

4.3 Building the image......................................................................................... 18


4.4 Optimizing the Dockerfile .............................................................................. 20

4.5 Optimizing Even Further ................................................................................ 21

4.6 Just Run and Test Boys, Run, and Test .......................................................... 22

4.7 Creating Multistage Builds in Dockerfiles....................................................... 23

4.8 Adding a Server Certificate ............................................................................ 25

4.9 Some Useful Commands ................................................................................ 26

5. MULTI-CONTAINER APPLICATIONS WITH DOCKER COMPOSE... 28

5.1 What is Docker Compose? ............................................................................. 28

5.2 Adding Docker Compose to Our Application ................................................... 29

5.3 Building the Image With Compose................................................................. 31

5.4 Adding a MSSQL Database with Docker Compose .......................................... 32

6. DOCKER HUB VS CREATING A LOCAL DOCKER REGISTRY .......... 38

6.1 Difference Between Docker Repository and Docker Registry ......................... 38

6.2 More About Docker Hub ................................................................................. 39

6.3 Creating a Local Docker Registry ................................................................... 40

6.4 Pushing Images to a Local Docker Registry ................................................... 42

6.5 Use Cases for the Local Docker Registry ........................................................ 43

You might also like