Labs
The following labs will provide examples to put the concepts and procedures that you learned about in this chapter into practice. We will use Docker Desktop as the container runtime and WSL2 (or your Linux/macOS Terminal) to execute the commands described.
Ensure you have downloaded the content of this book’s GitHub repository from https://github.com/PacktPublishing/Docker-for-Developers-Handbook.git. For this chapter’s labs, we will use the content of the Chapter4
directory.
Reviewing container networking concepts
In this section, we will review some of the most important networking topics we learned about in this chapter:
- First, we will run a container in the background, which will be used as a reference in other steps. We will run a simple
sleep
command:$ docker container run -d --name one alpine sleep INF 025e24a95b6939e025afda09bb9d646651025dfecc30357732e629aced18e66b
- Now that container
one
is running, we will run a second one directly with...