mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-13 22:03:28 +01:00
Disk usage grows uncontrollably #509
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ju-li on GitHub (Jun 29, 2023).
Hi everyone,
Does this happen to you too?
I ran

docker ps -a --sizeyesterday:And this was ran today:

After about 24h, the size of the containers have grown by 2GB
I am not doing anything with the containers. Not installing or downloading anything. Just running them in the background.
Why is this happening?
The docker command that I'm using is:
Note: I replaced the serials with {{}} placeholders
OS related issued, please help us identify the issue by posting the output of this
uname -a
; echo "${DISPLAY}"
; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
; grep NAME /etc/os-release
; df -h .
; qemu-system-x86_64 --version
; libvirtd --version
; free -mh
; nproc
; egrep -c '(svm|vmx)' /proc/cpuinfo
; ls -lha /dev/kvm
; ls -lha /tmp/.X11-unix/
; ps aux | grep dockerd
; docker ps | grep osx
; grep "docker|kvm|virt" /etc/group
Output is as follows:
@programmrz commented on GitHub (Jul 5, 2023):
I'm not sure exactly how the image works, but ANY write from the macOS "vm" will increase the size of the qcow image, until it reaches the size of the virtual disk you have macos installed on. You can resize the macos portion of the disk (I've set mine to 80gb) so the qcow2 image wont expand higher than that.
@OriWeiss commented on GitHub (Jul 20, 2023):
@programmrz can you please provide instructions on how to do this? I am having the same issue.
@ju-li commented on GitHub (Jul 20, 2023):
@OriWeiss I think he means in this step: https://github.com/sickcodes/Docker-OSX#additional-boot-instructions-for-when-you-are-creating-your-container
(optional) Create a partition using the unused space to house the OS and your files if you want to limit the capacity. (For Xcode 12 partition at least 60gb.)I haven't tested it but this sounds like a solution