Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Docker storage driver

Tags:

linux

docker

I am learning Docker storage and I am not clear about Docker storage drivers.

  1. What is docker's storage driver in layman's terms?
  2. How is it different than Backing Filesystem that docker info command shows?
  3. If someone wants to write his own storage driver? How to do that?
like image 843
Amol Sale Avatar asked Jul 01 '15 03:07

Amol Sale


People also ask

How to change the storage driver for a container in Docker?

Changing the Storage Driver for a Container If you wanted to change to the storage driver used for a container, you can do so when launching the container. This can be done by using the –volume-driver parameter when using the docker run command. An example is given below −

Which storage drivers are supported for Docker Enterprise?

For Docker Engine - Enterprise and Docker Enterprise, the definitive resource for which storage drivers are supported is the Product compatibility matrix. To get commercial support from Docker, you must use a supported configuration.

What is a storage driver in a container?

Storage drivers are intrinsically linked to a container’s “writable layer.” This term refers to the topmost level of a container’s filesystem which you can modify by running commands, writing files, and adding software at runtime.

What is the backing filesystem in Docker?

With regard to Docker, the backing filesystem is the filesystem where /var/lib/docker/ is located. Some storage drivers only work with specific backing filesystems. Among other things, each storage driver has its own performance characteristics that make it more or less suitable for different workloads. Consider the following generalizations:


1 Answers

I suggest you go and look at the presentation from one of the docker developers: http://www.slideshare.net/Docker/docker-storage-drivers

What is docker's storage driver in layman's terms?

When you use the FROM command in a Dockerfile you are referring to a base image. Rather than copy everything in a new image, you will share the contents (a.k.a. fs layers); this is what is known as a copy-on-write (holy cow!) filesystem. The docker storage driver is just which kind of COW implementation to use (AUFS, BTRFS ...). If you imagine your images as layers and depending on each other, you get a graph.

How is it different than Backing Filesystem that docker info command shows?

Same difference between logical and physical representation. The filesystem may be mounted as ext4 (where docker is installed) but used by docker daemon to leverage COW semantics.

If someone wants to write his own storage driver? How to do that?

Go and take a look at the graphdriver (manages the graph of layers).

https://github.com/docker/docker/tree/master/daemon/graphdriver

like image 135
dnozay Avatar answered Sep 29 '22 23:09

dnozay