Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Docker.qcow2?

I was looking at my disk with DaisyDisk and I have a 30GB something called Docker.qcow2. More specifically, DaisyDisk puts it under ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.qcow2. Is it some kind of cache? Can I delete it? I have a lot of images from old projects that I won't ever use and I'm trying to clear up my disk.

like image 888
dkimot Avatar asked Apr 17 '18 21:04

dkimot


People also ask

Can I delete Docker qcow2?

qcow2 file causing it to grow in size, until it eventually becomes fully allocated. It stops growing when it hits this maximum size. You can stop Docker and delete this file, however deleting it will also remove all your containers and images.

Where does Docker store images Linux?

On a linux system, docker stores data pertaining to images, containers, volumes, etc under /var/lib/docker.

Do Docker containers have an os?

The Docker platform runs natively on Linux (on x86-64, ARM and many other CPU architectures) and on Windows (x86-64). Docker Inc. builds products that let you build and run containers on Linux, Windows and macOS.


1 Answers

The .qcow2 file is exposed to the VM as a block device with a maximum size of 64GiB by default. As new files are created in the filesystem by containers, new sectors are written to the block device. These new sectors are appended to the .qcow2 file causing it to grow in size, until it eventually becomes fully allocated. It stops growing when it hits this maximum size.

You can stop Docker and delete this file, however deleting it will also remove all your containers and images. And Docker will recreate this file on start.

like image 106
Iryston Avatar answered Sep 20 '22 09:09

Iryston