Home > database >  Docker Error response from daemon: Error processing tar file(exit status 1): no space left on device
Docker Error response from daemon: Error processing tar file(exit status 1): no space left on device

Time:10-02

I need to create a docker's image from a virtual box image. The file is 16GB. When I run the command line # tar -c . | docker import - <myImagename> appear this error below.

P.S. : The container is empty.

Error:

Error response from daemon: Error processing tar file(exit status 1): write /var/lib/docker/overlay2/f8bb15057c3b3578c13e1122be1d00ca72b3301b7a0bf27262edc759e9f207fb/diff/var/lib/docker/overlay2/f8bb15057c3b3578c13e1122be1d00ca72b3301b7a0bf27262edc759e9f207fb/diff/var/lib/cassandra/commitlog/CommitLog-6-1633100360364.log: no space left on device

Docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.6.1-docker)
  scan: Docker Scan (Docker Inc., v0.8.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 20.10.8
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 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: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e25210fe30a0a703442421b0f60afac609f950a3
 runc version: v1.0.1-0-g4144b63
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 3.10.0-1127.el7.x86_64
 Operating System: CentOS Linux 7 (Core)
 OSType: linux
 Architecture: x86_64
 CPUs: 1
 Total Memory: 15.51GiB
 Name: GDBDEV03
 ID: UGGJ:AIIA:7C44:DZXR:PNYH:2WQH:GPKI:TFUL:N2WZ:5RRB:X3JK:VU3B
 Docker Root Dir: /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

EDIT

[root@GDBDEV03 chroot0]# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 7.8G     0  7.8G   0% /dev
tmpfs                    7.8G     0  7.8G   0% /dev/shm
tmpfs                    7.8G  8.7M  7.8G   1% /run
tmpfs                    7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/mapper/centos-root   14G   13G  1.3G  91% /
/dev/sda1               1014M  152M  863M  15% /boot
tmpfs                    1.6G     0  1.6G   0% /run/user/0

CodePudding user response:

first run docker image prune to clean up all dangling images

if this didn't help you might need to check this answer

Docker error : no space left on device

CodePudding user response:

It's not clear exactly what you're attempting to do (where is ., and is this a local docker engine or are you sending the image to a remote node). And putting a VM image inside of a container image is a significant code smell (containers aren't a VM).

That said, from description, you have a 16GB file you're trying to package on a system with 1.3G available to docker (assuming you are running docker from /var/lib/docker). There's just no way that's going to work under any conditions. Typically you want 2-3x the space available to handle the copies needed to package the layers.

So for your root partition, you'd want to expand that from 14GB to 45GB (13 current 3x16). Steps to expand the partition depend on your underlying storage and filesystem type, and would be more appropriate for superuser.SE.

  • Related