/ var / lib / docker / overlay2 / ... огромен, хотя НИЧЕГО не работает на docker - PullRequest
0 голосов
/ 16 июня 2020
root@****:/home/****# docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              0                   0                   0B                  0B
Containers          0                   0                   0B                  0B
Local Volumes       0                   0                   0B                  0B
Build Cache         0                   0                   0B                  0B
root@****:/home/****# docker images -a
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
root@****:/home/****# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS
NAMES

Это результат docker system df, и, как вы можете видеть, нет изображений, контейнеров и т. Д.

Однако / var / lib / docker / overlay2 использует ОГРОМНОЕ пространство следующим образом :

root@****:/home/****# du -h /var/lib/docker/overlay2/ | sort -hr | head
139G    /var/lib/docker/overlay2/
5.9G    /var/lib/docker/overlay2/a7ea104e24413200b446f5ff91d6b6da2c9e737a61e13454c12b6f7acab79d40/diff/python-docker/****
5.9G    /var/lib/docker/overlay2/a7ea104e24413200b446f5ff91d6b6da2c9e737a61e13454c12b6f7acab79d40/diff/python-docker
5.9G    /var/lib/docker/overlay2/a7ea104e24413200b446f5ff91d6b6da2c9e737a61e13454c12b6f7acab79d40/diff
5.9G    /var/lib/docker/overlay2/a7ea104e24413200b446f5ff91d6b6da2c9e737a61e13454c12b6f7acab79d40
5.3G    /var/lib/docker/overlay2/d1e624c4d1ece71b701ee2100af88edb083a39edd2810c66d312f6e889241edb/diff/python-docker/****
5.3G    /var/lib/docker/overlay2/d1e624c4d1ece71b701ee2100af88edb083a39edd2810c66d312f6e889241edb/diff/python-docker
5.3G    /var/lib/docker/overlay2/d1e624c4d1ece71b701ee2100af88edb083a39edd2810c66d312f6e889241edb/diff
5.3G    /var/lib/docker/overlay2/d1e624c4d1ece71b701ee2100af88edb083a39edd2810c66d312f6e889241edb
5.3G    /var/lib/docker/overlay2/cfdccf54b0022c0c6739f5c09639d5faf62ceba1ecb7b649bc396174620fd3d6/diff/python-docker/****
...

и моя docker информация выглядит следующим образом:

root@****:/home/****# docker info
Client:
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 19.03.11
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version:
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.15.0-106-generic
 Operating System: Ubuntu Core 16
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31.33GiB
 Name: ****
 ID: ****
 Docker Root Dir: /var/snap/docker/common/var-lib-docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Я не понимаю, почему так много всего в / var / lib / docker / overlay2. Если быть точным, виноват diff:

ncdu 1.12 ~ Use the arrow keys to navigate, press ? for help
--- /var/lib/docker/overlay2/a7ea104e24413200b446f5ff91d6b6da2c9e737a61e13454c12b6f7acab79d40 ----------
                         /..
    5.8 GiB [##########] /diff                                                                                                                                 e   4.0 KiB [          ] /work
    4.0 KiB [          ]  lower
    4.0 KiB [          ]  link
    0.0   B [          ]  committed
...