【问题标题】:docker import with Docker for Windows using Linux containers no space left on device error with Storage Driver: overlay2docker import with Docker for Windows using Linux containers no space left on device error with Storage Driver: overlay2
【发布时间】:2020-01-18 05:17:33
【问题描述】:

我正在使用 Docker for Windows 使用 Linux 容器导入 15 GB 的大型数据库映像(我可以毫无问题地导入 9.5 GB 的映像。)。我正在使用Windows 10 Pro 1803, build 17134.1006

错误:

PS C:\WINDOWS\system32> docker import "C:\Users\oscar\Desktop\MSSQL.tar" mssql
Error response from daemon: Error processing tar file(exit status 1): write /var/opt/mssql/data/TestDatabase.mdf: no space left on device

我已按照此处的建议删除了所有悬空卷和未使用的图像:

https://stackoverflow.com/a/37287054/3850405

在阅读有关存储驱动程序的信息时,我遇到了devicemapper 和其他驱动程序的一些限制。

https://docs.docker.com/engine/reference/commandline/dockerd/#options-per-storage-driver

对于devicemapper

指定创建基本设备时要使用的大小,这会限制 图像和容器的大小。默认值为 10G。笔记, 瘦设备本质上是“稀疏”的,所以一台 10G 设备主要是 empty 不使用池上的 10 GB 空间。但是,文件系统 设备越大,空壳占用的空间就越多。

https://docs.docker.com/engine/reference/commandline/dockerd/#dmbasesize

我找不到overlay2 的任何图像限制,默认情况下容器只有 20 GB 限制。

指定创建沙箱时使用的大小,用于 容器。默认为 20G。

我尝试运行示例命令,但出现错误。 dockerd 未映射到命令。

C:\>dockerd --storage-opt size=40G
'dockerd' is not recognized as an internal or external command,
operable program or batch file.

https://docs.docker.com/engine/reference/commandline/dockerd/#size

既然它应该可以工作,我不确定我是否走在正确的道路上。

系统信息:

PS C:\WINDOWS\system32> docker --version
Docker version 19.03.2, build 6a30dfc

PS C:\WINDOWS\system32> docker info
Client:
 Debug Mode: false

Server:
 Containers: 5
  Running: 0
  Paused: 0
  Stopped: 5
 Images: 8
 Server Version: 19.03.2
 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: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.9.184-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.837GiB
 Name: docker-desktop
 ID: XD32:TQJ4:EKWP:BPE4:ETXW:XFXE:LB3L:J4WB:PCFR:DAXK:MJ62:47RI
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 28
  Goroutines: 42
  System Time: 2019-09-17T10:00:50.1259999Z
  EventsListeners: 1
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

存储空间应该不是问题:

【问题讨论】:

    标签: docker docker-for-windows


    【解决方案1】:

    我应该学会阅读...阅读它作为 55.29 GB 未使用。在 Docker -> Settings -> Advanced 中增加磁盘映像最大大小后,一切都开始工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-05
      • 2020-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-30
      • 2016-11-28
      • 1970-01-01
      相关资源
      最近更新 更多