Search⌘ K

Containers Without Volumes

Explore the concept of Docker containers without volumes, understand the role of ephemeral storage, and learn why data in containers is temporary and tied to container lifecycle. This lesson helps you grasp when local storage is sufficient and the importance of treating containers as immutable for managing non-persistent data effectively.

In the early days of Docker, containers were only good for stateless applications that didn’t generate important data. However, despite being stateless, many of these apps still needed a place to write temporary scratch data. So, as shown in the figure below, Docker creates containers by stacking read-only image layers and placing a thin layer of local storage on top. The same technology allows multiple containers to share the same read-only image layers.

Ephemeral container storage
Ephemeral container storage

Local storage in Docker containers

...