Configure Docker with the devicemapper storage driver
NOTE: This is for Docker CE & Docker EE
Issue:
By default you will notice that docker storage device is "brtfs" i.e. default storage, which is limited to 20GB of data storage.
Usually
you will find this storage as too limited to use. As most of the times
we have to install multiple images that too of high storage like
4/8/10GB. And with this default storage you will be end up getting
frustrated.
Solution:
Configure Docker with "devicemapper" storage driver.
How to do this:
1) Stop Docker
$ sudo systemctl stop docker
2) Edit /etc/docker/daemon.json. If it does not yet
exist, create it. Assuming that the file was empty, add the following
contents.
{ "storage-driver": "devicemapper" }
Note: Docker will not start if the daemon.json file contains badly-formed JSON
3) Start Docker
$ sudo systemctl start docker
4) Verify that the daemon is using the devicemapper storage driver. Use the docker info command and look for Storage Driver
Note: This host is running in loop-lvm node, which is not
supported on production systems. This is indicated by the fact that
the Data loop file and a Metadata loop file are on files under
/var/lib/docker/devicemapper/devicemapper.
Useful link: Use device mapper storage driver
Hope this helps :-)
Enjoy :-)
Enjoy :-)
Good Blog.It is very so much valuable content.
ReplyDeleteDevOps Training
DevOps Online Training