After the server where Docker is located has been running for a while, it was found that the server disk directory was running out of space. By checking the directories level by level through du -h --max-depth=1 /, it is found that the files in the /var/lib/docker directory are too large. Use the following method to solve this problem. Transfer data to modify docker default storage location There are several ways to modify the default storage location of Docker. - Stop the docker service systemctl stop docker - Create a new docker directory, execute the command df -h, and find a large disk I created the /data/docker/lib directory under the /data directory mkdir -p /data/docker/lib - Migrate the files under /var/lib/docker directory to /data/docker/lib Completed docker path after migration: /data/docker/lib/docker rsync -avz /var/lib/docker/ /data/docker/lib/ - Configure /usr/lib/systemd/system/docker.service vi /usr/lib/systemd/system/docker.service [Service] ExecStart=/usr/bin/dockerd --graph=/data/docker/lib/docker - Restart Docker systemctl daemon-reload systemctl restart docker systemctl enable docker - Confirm whether the Docker Root Dir modification has taken effect [root@iZbp1jcwx7sfb1yrnvpg84Z docker]# docker info ... Docker Root Dir: /data/docker/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ ... - After the startup is successful, confirm whether the previous image is still there [root@iZbp1jcwx7sfb1yrnvpg84Z docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE 10.80.177.233/policy 2.1.2 64ac4e178cd2 2 hours ago 818 MB 10.80.177.233/crm 2.1.3 d7636fbb7a29 2 hours ago 762 MB - After confirming that the container is OK, delete the files in the /var/lib/docker/ directory This is the end of this article about solving the problem of insufficient docker disk space. For more relevant content about insufficient docker disk space, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Steps and pitfalls of upgrading linux mysql5.5 to mysql5.7
>>: CSS3 transition to achieve underline example code
1 Start the Docker service First you need to know...
Mysql 8.0 installation problems and password rese...
Recently I was looking at how Docker allows conta...
mysqldump tool backup Back up the entire database...
Table of contents Preface 1. bat executes js 2. T...
Today I will share with you a breathing carousel ...
To execute a shell command in Docker, you need to...
This article is from the Apache Spark Meetup held...
1. Download 1. Download the installation package ...
1. Databases and database instances In the study ...
In the previous article, I introduced the detaile...
Table of contents 1. Reasons for index failure 2....
Server Status Analysis View Linux server CPU deta...
Starting from this article, a new series of artic...
MySQL trigger syntax details: A trigger is a spec...