Store Docker image files in external drive in El C

2019-04-26 16:44发布

Docker newbie here. I'm using a Mac Book Pro with 128Gb disk. Is there any way to have the docker images be stored in an external hard drive rather than on the mac's main drive? I don't have that much free space, and can't afford to remove any installed software. Ideally I'd like to have Docker fetch the images from an external drive. Can this be done using a symlink?

Thanks

标签: macos docker
2条回答
劫难
2楼-- · 2019-04-26 17:24

Eventually figured out that docker can use a symlink. In a Mac OS setup the file that I want to place in an external drive is located at ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/ and is named Docker.qcow2 Just move the file to an external disk drive (for instance) and create a symlink pointing to the new location

查看更多
男人必须洒脱
3楼-- · 2019-04-26 17:25

I was able to get this working and documented it here. It is basically a symlink to the folders mentioned.

查看更多
登录 后发表回答