Docker挂悬挂音量 [英] Docker mount dangling volume

查看:166
本文介绍了Docker挂悬挂音量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Windows上创建了一个在boot2docker上运行的mongodb docker实例。



不幸的是,在我用kitematic进行实验时,我设法意外地从mongo容器中删除卷,并且不再访问我的数据。



mongo实例似乎已经创建了一个新卷,而旧卷现在仍然悬空(孤立),而不是挂载在任何容器中。 p>

有没有办法恢复?

解决方案

感谢您的回复它让我在正确的轨道上,我设法使用以下命令启动一个新的mongo容器

  docker run -d -v 571284fbe08a3f2b675af299ec14e55550bad623f6316914d465843fa12d6f18:/ data / db mongo 

其中 571284fbe08a3f2b675af299ec14e55550bad623f6316914d465843fa12d6f18 是确定的悬挂卷通过使用

  docker volume ls 


I recently created a mongodb docker instance running on boot2docker on windows.

Unfortunately during my experimenting with kitematic I managed to accidentally remove the volume from the mongo container and can no longer access my data.

The mongo instance seems to have created a new volume with the old volume now remaining dangling (orphaned) and not mounted in any containers.

Is there any way to recover this?

解决方案

Thanks for your reply it got me on the right track, I managed to start a new mongo container using the following command

docker run -d -v 571284fbe08a3f2b675af299ec14e55550bad623f6316914d465843fa12d6f18:/data/db mongo

where 571284fbe08a3f2b675af299ec14e55550bad623f6316914d465843fa12d6f18 is the dangling volume identified by using

docker volume ls

这篇关于Docker挂悬挂音量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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