各位用docker的朋友,你们是否为/var/lib/docker独立分配一个分区呢?
伊谢尔伦
伊谢尔伦 2017-04-25 09:03:29
0
3
711

赶脚镜像一多,数据量挺大的啊:(

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
伊谢尔伦

On production servers yes.

滿天的星座

It does not have to be an independent partition, you can also modify this line by using --graph参数来指定存储路径。
或者使用systemd来管理服务, 就在docker.service at startup:

ExecStart=/usr/bin/dockerd --graph=/path/to/docker/dir -H fd://  

Execute after restartingsudo docker info | grep "Root Dir", you can see that the root path has changed.

小葫芦

The main problem is not the image, but the running container uses this directory by default. Therefore, if there are log files written inside the container, or other production running data will affect the /var/lib/docker directory. Therefore, the production environment needs:

1. Regularly clean up useless images
2. Regularly clean out launched containers
3. /var/lib/docker Make independent directory partitions, preferably using SSD disks
4. The method provided by the system above is also good.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template