将Docker映像文件存储在El Capitan OSX的外部驱动器中 [英] Store Docker image files in external drive in El Capitan OSX

查看:65
本文介绍了将Docker映像文件存储在El Capitan OSX的外部驱动器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处是Docker新手.我正在使用具有128Gb磁盘的Mac Book Pro.有什么方法可以将Docker映像存储在外部硬盘驱动器中,而不是在Mac的主驱动器中?我没有那么多可用空间,也无法删除任何已安装的软件.理想情况下,我想让Docker从外部驱动器获取图像.可以使用符号链接吗?

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?

谢谢

推荐答案

最终弄清楚了docker可以使用符号链接.在Mac OS安装程序中,我要放置在外部驱动器中的文件位于 〜/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/ 并被命名 Docker.qcow2 只需将文件移动到外部磁盘驱动器(例如)并创建指向新位置的符号链接

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

这篇关于将Docker映像文件存储在El Capitan OSX的外部驱动器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆