形式
Plain text
投稿日時
2023-08-02 18:42
公開期間
無期限
  1. 2023-08-01
  2. What happens is that sometimes the /var/lib/docker/overlay2 folder gets filled with subfolders and its size increase.
  3. No amount of `docker system prune -a -f` or 'docker image prune -a' or 'docker buildx prune -a' or similar command is able to clean up everything. A good chunk of subfolders stay there.
  4. So what to do?
  5. As of today, the overlay2 folder contains subfolders that represent container layers. If while building an image a middle step was creating data during the build process, that layer is saved and stored in the overlay2 folder.
  6. It would be like /var/lib/docker/overlay2/<some hash>/diff/<data here> .
  7. Now this should be deleted with image prune -a or the cache prune. But it is not, because somehow those folder gets orphaned.
  8. One approach is the following. (if one can delete everything)
  9. - Stop the docker service.
  10. - list the docker packages in the system, for example: yum list installed | grep -i docker
  11. - remove them (yum remove <packages>)
  12. - then move /var/lib/docker to /tmp
  13. - reinstall the packages
  14. - ensure that docker works
  15. - remove /tmp/docker
  16. If you cannot remove everything:
  17. - stop the docker service
  18. - Collect all the folder names that are hashes.
  19. - then you can try to delete the content saved by the container, removing entries in each /var/lib/docker/overlay2/<hash>/diff/<content that can be removed>
  20. - restart the docker service
  21. - do some tests, it should work.
ダウンロード 印刷用表示

このコピペの URL

JavaScript での埋め込み

iframe での埋め込み

元のテキスト