Docker No space left

failed to register layer: open /root/.yarn/berry/cache/minimist-npm-1.2.8-d7af7b1dce-10c0.zip: no space left on device

I may have messed something with the permissions of the docker user

df -h
Filesystem      Size  Used Avail Use% Mounted on
dev              16G     0   16G   0% /dev
run              16G  1.9M   16G   1% /run
efivarfs        148K   46K   98K  33% /sys/firmware/efi/efivars
/dev/nvme0n1p2   50G   47G  3.4G  94% /
tmpfs            16G     0   16G   0% /dev/shm
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-udev-load-credentials.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-sysctl.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-tmpfiles-setup-dev-early.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-tmpfiles-setup-dev.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-vconsole-setup.service
tmpfs            16G  4.0K   16G   1% /tmp
/dev/nvme0n1p1 1022M  314M  709M  31% /boot
/dev/nvme0n1p3  881G  229G  652G  26% /home
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-tmpfiles-setup.service
tmpfs           3.1G   64K  3.1G   1% /run/user/1000
docker info      
Client:
 Version:    27.2.0
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  2.29.2
    Path:     /usr/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 27.2.0
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.10.9-arch1-2
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 30.66GiB
 Name: archlinux
 ID: 01dc8b48-190d-422a-8c69-d8fab62e3e22
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

“no space left” has nothing to do with permissions. It is what it says, you have no space left. If you see you have, it could be that by the time you check the free space, files were already deleted or never even actually stored since there was nt enough space for the whole data.

I try. I’m new, how can I do this?

It is not about Docker anymore. Yoiu need more space on your system. 3.4 GB is really not much. Not just for Docker, for anything. And if you can, use a separate partition for Docker (/var/lib/docker), so when container or images use a lot of space, it will not fill up your root partition and only docker will be affected…How much space you need, it depends on what you do. I personally would not start with less then 20GB, but if you build lareg images or volumes, create an even larger partition. If you have no free space to use for a new partition, you can add a new disk.