Why does storage matter for containers?
Before moving forward in the chapter and answering this interesting question, we need to distinguish between two kinds of storage for containers:
- External storage attached to running containers to store data, making it persistent on a container's restart
- Underlying storage for root filesystems of our containers and container images
Talking about external storage, as we described in Chapter 1, Introduction to Container Technology, containers are stateless, ephemeral, and often with a read-only filesystem. This is because the theory behind the technology states that containers should be used for spawning scalable and distributed applications that have to scale horizontally instead of vertically.
Scaling an application horizontally means that in case we require additional resources for our running services, we will not increase CPU or RAM for a single running container, but we will instead launch a brand new container...