Network and Volumes Fundamentals
In the previous chapter, we managed to create our core Go application and provide storage using a Redis server. By having our core application in place, we proceeded to more advanced Docker concepts such as health checks, building images, tagging, and logically grouping using labels. The usage of volumes and networking was present throughout the chapter. Networking and volumes were being used all along; however, it was done transparently. This chapter will focus extensively on networks and volumes and how to configure them on a Compose-based application.
The first part will focus on volumes, how volumes map to Compose, how they work behind the scenes, and how to use them. Volumes play a crucial role in Docker. They allow you to attach external documentation and files that are needed for an application. Volumes can be shared and used to help with operations in an application.
The second part will focus on networks. Docker provides networking...