Then check the file on the host: $ ls -s Docker.raw If you switch back to the alpine container terminal and delete the file: / # rm -f 1GiB Note the increase in size from 9964528 to 12061704, where the increase of 2097176 512-byte sectors # dd if=/dev/zero of=1GiB bs=1048576 count=1024īack on the host check the file size again: $ ls -s Docker.raw Next start a container in a separate terminal and create a 1GiB file in it: $ docker run -it alpine sh Number of blocks used is not necessarily the same as the file “size”, as the file can be Note the use of -s which displays the number of filesystem blocks actually used by the file. To demonstrate the effect, first check the current size of the file on the host: $ cd ~/Library/Containers//Data/64-linux/ If Docker is used regularly, the size of the Docker.raw (or Docker.qcow2) can keep growing, So the Docker.raw (or Docker.qcow2) contain image and container data, written by the LinuxĮxt4 and overlay filesystems. Hard-coded sector size of the virtual disk device. The data will be written to byte offset x * 512 in the file Docker.raw where 512 is the Which configures hyperkit to emulate an AHCI disk device such that when the VM writes to sector x on the device, Top of an ext4 filesystem on top of the partition /dev/sda1.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |