This section explains how to combine our catalog service with Docker to get it running locally. Let's start by examining the systems behind the catalog service:
As we can see from the preceding diagram, the web service part runs over the microsoft/dotnet Docker image, and the data source part runs over the Microsoft SQL Server instance using the microsoft/mssql-server-linux Docker image (we already dealt with the containerization of MSSQL in Chapter 8, Building the Data Access Layer). Both of the images are downloaded from the public Microsoft repository already present in Docker Hub; let's take a look at how to use docker-compose to define the whole infrastructure of the service.
First of all, let's create a docker-compose.yml file with the following content in the root folder of the project:
version: "3.7"
services...