Data Volumes and Configuration
In the previous chapter, we learned how to build and share our container images. Focus was placed on how to build images that are as small as possible by only containing artifacts that are needed by the containerized application.
In this chapter, we are going to learn how we can work with stateful containers – that is, containers that consume and produce data. We will also learn how to configure our containers at runtime and at image build time, using environment variables and config files.
Here is a list of the topics we’re going to discuss:
- Creating and mounting data volumes
- Sharing data between containers
- Using host volumes
- Defining volumes in images
- Configuring containers
After working through this chapter, you will be able to do the following:
- Create, delete, and list data volumes
- Mount an existing data volume into a container
- Create durable data from within a container using a data...