-
Book Overview & Buying
-
Table Of Contents
Pragmatic Microservices with C# and Azure
By :
The .NET CLI dotnet publish command supports creating Docker images without using a Dockerfile. However, to understand Docker, we need to know about Dockerfiles. That’s why we start building a Docker image defining a Dockerfile first.
In this section, we will do the following:
dotnet publishDocker images are created using instructions in Dockerfiles. Using Visual Studio, you can easily create a Dockerfile from Solution Explorer, using Add | Docker Support. Make sure to select Dockerfile for the Container build type option. Adding a Dockerfile to the Codebreaker.GamesAPI project creates a multi-stage Dockerfile. A multi-stage Dockerfile creates interim images for different stages.
With the following code snippets, the different stages...