Starting a multi-container solution
As you make more use of Docker, your solution will become distributed across more containers - either running custom code that you split out from a monolith, or tried and trusted third-party software from Docker Hub or Docker Store.
NerdDinner now runs across four containers - SQL Server, the web app, the nats message queue, and the message handler. There are dependencies between the containers, and they need to be started in the correct order and created with the correct names so that components can be found using Docker's service discovery.
In the next chapter, I'll use Docker Compose to declaratively map out these dependencies. For now, I have a PowerShell script ch05-run-nerd-dinner_part-1.ps1
which explicitly starts the containers with the correct configuration:
docker container run -d -p 4222 ` --name message-queue ` nats:nanoserver; docker container run -d -p 1433 ` --name nerd-dinner-db ` -v C:\databases\nd:C:\data ` dockeronwindows/ch03-nerd...