Docker Image | Docker image storage
Tousestoragedriverseffectively,it’simportanttoknowhowDockerbuildsandstoresimages,andhowtheseimagesareusedbycontainers.Youcanusethisinformationtomakeinformedchoicesaboutthebestwaytopersistdatafromyourapplicationsandavoidperformanceproblemsalongtheway.StoragedriversversusDockervolumesDockerusesstoragedriverstostoreimagelayers,andtostoredatainthewritablelayerofacontainer.Thecontainer’swritablelayerdoesnotpersistafterthecontainerisdeleted,butissuitableforstoringephemeraldatathatisgeneratedatrunt...
To use storage drivers effectively, it’s important to know how Docker builds and stores images, and how these images are used by containers. You can use this information to make informed choices about the best way to persist data from your applications and avoid performance problems along the way.
Storage drivers versus Docker volumesDocker uses storage drivers to store image layers, and to store data in the writable layer of a container. The container’s writable layer does not persist after the container is deleted, but is suitable for storing ephemeral data that is generated at runtime. Storage drivers are optimized for space efficiency, but (depending on the storage driver) write speeds are lower than native file system performance, especially for storage drivers that use a copy-on-write filesystem. Write-intensive applications, such as database storage, are impacted by a performance overhead, particularly if pre-existing data exists in the ...