外部硬盘驱动器上的Docker卷 [英] Docker volume on external hard drive

查看:85
本文介绍了外部硬盘驱动器上的Docker卷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Postgres映像在本地运行容器. 我需要处理大量数据,并且我想为此使用外部硬盘驱动器.是否可以在外部硬盘驱动器上装载卷?我可以使用 Flocker 完成我想要的吗?

I'm using a postgres image to run a container locally. I need to process a significant amount of data and I want to use an external hard drive for this. Is it possible to mount a volume on an external hard drive? Can I accomplish what I want with Flocker?

我在Mac上使用本机docker.

I'm using native docker for mac.

推荐答案

在Mac上安装外部驱动器,然后转到Docker图标->首选项->文件共享.将驱动器路径添加到该列表.然后,当您执行docker run -v /path/to/drive:/target myimage时,它将把驱动器安装到容器中(在该示例中为/target).

Mount the external drive on your mac, and then go to the Docker icon -> preferences -> file sharing. Add your drive path to that list. Then when you do a docker run -v /path/to/drive:/target myimage it will mount your drive into your container (at /target in that example).

这篇关于外部硬盘驱动器上的Docker卷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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