Open dontturnaway opened 1 year ago
I found the similar issue here https://github.com/docker/for-mac/issues/6797, but there wasn't Diagnostics ID, so I'm afraid it would be closed. Don't want to unfocus this issue due a formal errors of templating by another author.
I have the same problem.
After reinstall version 4.16.0 (95345) and change disk image localtion works fine.
Then update to latest version 4.18.0 (104112)
After reinstall version 4.16.0 (95345) and change disk image localtion works fine.
Then update to latest version 4.18.0 (104112)
So, to overcome this bug I need to downgrade first my 4.18 (104112) - > 4.16 and then upgrade again 4.16 - > 4.18? Right?
So, to overcome this bug I need to downgrade first my 4.18 (104112) - > 4.16 and then upgrade again 4.16 - > 4.18? Right?
Yes, by doing that, I successfully changed the disk image localtion to my external hard drive.
Yes, by doing that, I successfully changed the disk image localtion to my external hard drive.
Are you able to uninstall Docker Desktop too using appropriate menu in program (Docker -> Troubleshoot -> Uninstall)?
I was even unable to uninstall it to switch to the previous version you mention. At least, with using GUI.
Only /Applications/Docker.app/Contents/MacOS/uninstall
works.
Yes, by doing that, I successfully changed the disk image localtion to my external hard drive.
Are you able to uninstall Docker Desktop too using appropriate menu in program (Docker -> Troubleshoot -> Uninstall)? I was even unable to uninstall it to switch to the previous version you mention. At least, with using GUI. Only
/Applications/Docker.app/Contents/MacOS/uninstall
works.
same.
Same problem on latest version (4.19). Hangs indefinitely on changing the docker image directory.
I have the same problem.
After reinstall version 4.16.0 (95345) and change disk image localtion works fine.
Then update to latest version 4.18.0 (104112)
Same problem on latest version (4.19). Hangs indefinitely on changing the docker image directory.
After uninstall 4.19 and install 4.16.0, it can changes disk image location.
Same issue.
Any progress on this? same issue on Windows 10 Pro.
Same here +1.
Thanks for the workaround with the downgraded versions, that worked for me. As a reference, check the Docker release notes to find where to download an older version: https://docs.docker.com/desktop/release-notes/#4163
Same here on 4.20.0 (109717) at macOS Ventura, downgrading to 4.16.2 also worked
Another workaround that worked for me without downgrading and using a symlink to the external volume: https://www.howtogeek.com/devops/how-to-store-docker-images-and-containers-on-an-external-drive/
Still hangs on 4.21.1 (114176), but workaround with symlink works, but needs to point from data folder in first location to another folder in second location.
https://www.howtogeek.com/devops/how-to-store-docker-images-and-containers-on-an-external-drive/
I did find a sort of halfway house to sorting this as I was experiencing the same issue, wanting to move my Docker.raw to an external SSD. This is on OSX Ventura. Just bear in mind with this approach you will lose all data in the Docker.raw as it will initialise a new one.
Here what I did:-
Just bear in mind this is just moving Docker.raw and not any of the log files etc. I've not bothered moving the rest although I'm guessing symlinking the directory itself further up the path would likely work, but I only really care about moving the main docker disk image file.
Why didn't I copy the Docker.raw to the SSD to retain my existing docker images/volumes etc.?
Well you could and maybe that would work, but it appears as though the file has a "virtual allocation" of what you set it to (128GB in my case) and doing a copy of that will copy the entire 128GB file so you'll immediately waste a load of space that's not actually been written to. So for me 30GB used out of 128GB would have wasted near 100GB of space on the SSD.
I'm sure there's maybe a way of copying while keeping the virtual allocation intact through dd
or something, but didn't bother to look too deeply into this side of things.
I can't vouch for the stability of this hack (e.g., not checked/ran into what happens if the disk isn't attached and docker is running or it started up), but appears to be working. I guess you'd probably risk maybe Docker.raw file corruption which it can't recover from and you have to re-initialise a fresh Docker.raw.
I hope this helps someone.
I met the same question. I tried some ways but it failed. Then when I changed my "virtual disk limit" and "Disk image location", and clicked the"Apply & restart" button both, it worked. I hope this can help. My docker desktop version is 24.0.2
I'm encountering this issue on v4.21.1 (114176)
Me too
same issue with v4.19.0. It costs 60GB, too much to sustain in 256GB system disk. It would be nice to get solved soon. Hopefully 4.21.2?
Same issue for me with 4.22.0 (117440) on Ventura 13.5 (22G74) using the "Virtualization Framework" option (if that matters). It also seems to take it sometimes without hanging but then a restart of the Docker Desktop app causes it to revert back to the original location and never use the new one.
Update The below is a work-around that appears to work for me at least:
ps -efww | grep Docker
mkdir -vp /Volumes/<Name>/DockerDesktop/vms
cd ~Library/Containers/com.docker.docker/Data
vms
directory: rm -rf vms
ln -s /Volumes/<Name>/DockerDesktop/vms .
Had the same problem on Ventura 13.4.1 (Intel i5) and Docker 4.21.1
Got it working after doing a clean/purge and reset to factory defaults.
Anyone got a solution to this yet? (On mac docker desktop). I have about 15gigs of space left on my main drive and a nvme high speed ext hard drive (Takes about 15 seconds to move 30gigs of ram onto it, its fast) to move it to, but it shits the bed everytime I try.
Anyone got a solution to this yet? (On mac docker desktop). I have about 15gigs of space left on my main drive and a nvme high speed ext hard drive (Takes about 15 seconds to move 30gigs of ram onto it, its fast) to move it to, but it shits the bed everytime I try.
Uninstal your current docker installation then install v4.16.xx instead , then move your docker image to external ssd trough setting. Verify docker installation by running some docker sample, and if it success then you can update docker desktop to latest version. This way works on my mac m1 air with 512 GB external NVME SSD
I couldn't change Disk image location even if I installed v4.16.2 Mac with Apple chip.
DockerDesktop/Docker.raw
file in designated location but Docker Desktop starting...
doesn't finish...Above 4 situation
Confirming the same issue on the following system:
13.5.2 (22G91)
4.22.1 (118664)
The "Disk Image Location" setting doesn't work. The new location folder is always empty. Also if I change the "Virtual Disk Limit" for example, I see that the size of the default folder (/Users/$USER/Library/Containers/com.docker.docker
) is changed. Restarting OS or Docker engine doesn't have any effect. Deleting the default folder also leads to it's recreation on the default location and not on a new path.
Almost zero documentation, big tech company and such a result... Cannot believe.
Downgrading to 4.16.2 did not work for me. Docker still locks up after applying the disk image location change.
I'm at a loss. Will I have to buy a new computer just to use Docker? I'm out of disk space. What alternatives are there?
Edit: after restarting docker 3x, magically it's working.
Edit 2: It seems like Docker (maybe MacOS Monterey in general) has issues with ExFAT filesystems, switching to APFS resolved issues such as incorrect no space left on device
Almost zero documentation, big tech company and such a result... Cannot believe.
Downgrading to 4.16.2 did not work for me. Docker still locks up after applying the disk image location change.
I'm at a loss. Will I have to buy a new computer just to use Docker? I'm out of disk space. What alternatives are there?
Edit: after restarting docker 3x, magically it's working.
Edit 2: It seems like Docker (maybe MacOS Monterey in general) has issues with ExFAT filesystems, switching to APFS resolved issues such as incorrect
no space left on device
I've got this working on my macbook m1 using SSD
Using APFS as its format
Has this EVER worked? I've bug reported this years ago. It was just ignored then, and seems to be now as well.
Also, if you symlink to the volume instead, it kind of works, but if you try to update/change size to the image, the image goes corrupt and docker dies really really hard, like having to manually dig through and remove config files because "reset to defaults" crashes docker hard...
I think it might not work because of macOS security limitations... I saw that Google Drive also doesn't allow changing the location setting for file streaming because of the "file provider" (https://support.google.com/drive/answer/12178485) and the Google Drive for macOS doesn't allow change the location in settings (it becomes gray).
Moving to my preferred location and then adjusting it in /Users/[user]/Library/Group Containers/group.com.docker/settings.json
worked for me :)
Mudar para o local da minha preferência e ajustá-lo
/Users/[user]/Library/Group Containers/group.com.docker/settings.json
trabalhado para mim :)
As you did
Moving to my preferred location and then adjusting it in
/Users/[user]/Library/Group Containers/group.com.docker/settings.json
worked for me :)
Yes this finally worked on the latest version 4.25.1 I was going nuts because I had no free space on internal ssd but I had an external one which I bought MAINLY because I wanted to save and download and run much more containers.
issue still present on version 4.25.1
"fix" that worked for me: change -Disc image location- to your external disk (APFS) drag the allocated space slider to minimum a message saying something like "your existing containers will be removed" should pop up accept Docker.raw should be recreated on your external disk
issue still present on version 4.25.1
"fix" that worked for me: change -Disc image location- to your external disk (APFS) drag the allocated space slider to minimum a message saying something like "your existing containers will be removed" should pop up accept Docker.raw should be recreated on your external disk
Interesting because I did the same thing but docker would just create an empty folder called DockerDesktop and that's it, I had to override settings.json to a location in the external ssd and only then it created Docker.raw (It was writing at full write speed on ssd for a couple of minutes also)
What i tried and make it work,
daemon.json
file "data-root": "/Volumes/<ExternalDrive>"
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false,
"data-root": "/Volumes/MyExternal"
}
hint: The deamon.json
file exists unde ~/.docker/deamon.json
I have encountered a similar problem with version 4.25.2 on MacOS ventura.
In my case after changing the location and clicking Apply & restart, it did not hang. It looked like everything worked but when I do a build it is still using the old location. I tried exiting Docker Desktop and then restarting and found it reverted back to the original location. So it seems that the setting is not actually saved.
I tried setting data-root in the ~/.docker/daemon.json and when I started the Docker Desktop it created a number of files & folders but the Engine startup hung and after several attempts at restarting and rebooting I still could not get the Engine to start successfully. I removed the data-root from the json file and the Engine started correctly.
At this point I will try using a symlink instead.
Update: I now have it working without having to use a symlink.
Below is what I did, but not sure if the first two are really needed:
Because the external drive is not an SSD and is several years old the slowness is to be expected. Now that I know it does work, I have ordered a new SSD drive with a faster transfer rate.
I am running running MacOS ventura and the latest version of Docker Desktop.
I received my new SSD drive and have simplified the steps that work to move the Disk image location to an external USB drive. To reiterate, I am running MacOS Ventura and Docker Desktop 4.25.2.
It may take a while for the Docker Engine to start. The larger the image, the longer it takes. This is also true with the speed of your drive and the transfer rate. With USB 3 SSD and a transfer rate of 1000mb it took 3-4 minutes for a 100GB image.
Feature Request: What would be beneficial is to know how to change the location of the Disk Image without needing to go through Settings in Docker Desktop. I would like to keep a separate external drive for each client.
Moving to my preferred location and then adjusting it in
/Users/[user]/Library/Group Containers/group.com.docker/settings.json
worked for me :)
thank you so much this is the only thing that worked for me. I did a lot of the recommendations here and nothing worked but this. I even uninstalled / reinstalled ect.... Just to let everyone know i had to go to the original location & delete the Docker.raw file because that was taking up space. Moving the location didn't move / delete the original file.
@robert914 Thank you so much for solution! It worked for me.
Similar problem in Docker Desktop version 4.28.0 (139021), on Mac OS Sonoma 14.3.1.
In the GUI, Docker seems to accept the new disk image location. "Apply & restart" works without problems. But the file is not created at the new location, and after a restart of Docker Desktop, the "Disk Image Location" in the GUI is again at the old location.
Finally, after a lot of hassle, this workaround solved my problem: https://github.com/docker/for-mac/issues/6803#issuecomment-1822152639
It would be nice if this bug could be fixed by docker!
issue still present on version 4.25.1
"fix" that worked for me: change -Disc image location- to your external disk (APFS) drag the allocated space slider to minimum a message saying something like "your existing containers will be removed" should pop up accept Docker.raw should be recreated on your external disk
I know it's been months since you posted this but you just saved me lots of time. It worked! Thanks!
I am facing the same issue on version 4.34.3. I managed to set the location on a NAS drive editing the settings.json file manually. Then I tried to make the disk image bigger and everything freezes again. Super annoying issue.
I solved this by resizing the virtual disk limit to the minimum in the docker desktop settings.
Expected behavior
After changing Settings -> Resources -> Advanced -> Disk Image location to external volume -> empty folder, Docker should successfully change it to new location and restart.
Actual behavior
After changing Settings -> Resources -> Advanced -> Disk Image location to an empty folder on external volume, Docker hangs forever on "Apply & restart", the circle of progress bar constantly spins. Docker service becomes inactive and hangs in restarting state.
If I try to do it for the same partition, where disk image originally was, it works as intended.
Information
I did a clean install of Docker Desktop from the official site. Waited for it to finish changing directory for more than 30 mins. The directory to where I move is clean of any files. A disk space available is more than 100Gb on both drives, where Docker is installed and the directory, where I move. The disk is free of errors and the both volumes for Docker and where I move is internal disk of MacBook, which never failed and allows blazing fast disk access. I also tried:
uninstaller /Applications/Docker.app/Contents/MacOS/uninstall
and reboot for sure before installing againReduce disk limit and swap to the minimum values available, 8Gb for disk limit and 0Gb for swap respectively.
Output of
/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
Steps to reproduce the behavior