拉动图像时设备上没有剩余空间

max*_*max 8 docker

在Windows 10 Build 14393下使用Docker 1.13.0(9795)时,我试图运行最新的python图像(这将是3.6)时"设备上没有剩余空间":

> docker run -it python
Unable to find image 'python:latest' locally
latest: Pulling from library/python
5040bd298390: Pull complete
fce5728aad85: Pull complete
76610ec20bf5: Pull complete
52f3db4b5710: Extracting [==================================================>] 129.8 MB/129.8 MB
45b2a7e03e44: Download complete
75ef15b2048b: Download complete
e41da2f0bac3: Download complete
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: failed to register layer: Error processing tar file(exit status
 1): write /usr/share/doc/libfreetype6/reference/ft2-type1_tables.html: no space left on device.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
Run Code Online (Sandbox Code Playgroud)

硬盘驱动器上有超过20 GB的可用空间,因此我认为问题出在Docker的虚拟机中.如何访问它以调查磁盘使用情况并在需要时进行清理?

docker imagesdocker ps -a没有发现任何大的东西:

> docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              latest              f49eec89601e        2 days ago          129 MB
d4w/nsenter         latest              9e4f13a0901e        4 months ago        83.8 kB
> docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
ae1e7c7b11ed        ubuntu              "/bin/bash"         10 minutes ago      Exited (0) 9 minutes ago                       quirky_rosalind
Run Code Online (Sandbox Code Playgroud)

单独拉动没有帮助:

> docker pull python
Using default tag: latest
latest: Pulling from library/python
5040bd298390: Pull complete
fce5728aad85: Pull complete
76610ec20bf5: Pull complete
52f3db4b5710: Extracting [==================================================>] 129.8 MB/129.8 MB
45b2a7e03e44: Download complete
75ef15b2048b: Download complete
e41da2f0bac3: Download complete
failed to register layer: Error processing tar file(exit status 1): write /usr/bin/g++-4.9: no space left on device
Run Code Online (Sandbox Code Playgroud)

小智 16

您将需要删除所有已停止的容器以及所有未由任何容器使用的卷和网络。它还将删除所有悬空图像。

docker system prune
Run Code Online (Sandbox Code Playgroud)


ali*_*ati 12

您可以使用此命令查看是否有隐藏图像。

docker image ls -a
Run Code Online (Sandbox Code Playgroud)

如果你想删除所有这些,你可以使用这个命令:

docker rmi -f $(docker image ls -a -q)
Run Code Online (Sandbox Code Playgroud)

您知道有时图像文件存储在硬盘中会导致容量不足。


Hos*_*ani 11

我今天遇到了这个错误。

docker prune, docker rmi ..., df -h,df -ih等可能不错,但原因是docker devicemapper Base Device Size。该docker info命令提供有关信息。

我参考这个以获得完整的解释。

但是,这些步骤将解决问题:

systemctl stop docker.service
dockerd --storage-opt dm.basesize=20G
(you should terminate the command with Ctrl+C)
service start docker
Run Code Online (Sandbox Code Playgroud)

  • docker不再启动了。收到此错误“无法连接到位于 unix:///var/run/docker.sock 的 Docker 守护进程”。docker 守护进程正在运行吗? (4认同)

Pez*_*lio 6

如果您在 OSX(或类似版本)上使用 Docker Desktop,则可以通过访问首选项、增加基本映像大小并单击“应用并重新启动”来解决此问题

在此处输入图片说明