如何从Windows Shell访问Docker VM(MobyLinux)文件系统? [英] How to access the docker VM (MobyLinux) filesystem from windows shell?

查看:129
本文介绍了如何从Windows Shell访问Docker VM(MobyLinux)文件系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以登录主机VM的外壳,类似于我们如何轻松地进入正在运行的容器bash?

Is there away to log into host VM's shell, similarly to how can we easily enter into running containers bash?


docker exec-它bash

docker exec -it bash

我不小心破坏了一个容器的关键文件,因此无法启动。不幸的是,该容器将其数据存储在其中。结果是,无论何时我尝试运行它,都无法启动。我看到的唯一解决方案是导航到托管docker daemon的文件。但是,我在Windows上运行Docker VM,并且无法访问VM(MobyLinuxVM)中的文件。

I accidentally broke one container's crucial file, so that it couldn't start. Unfortunately, that container stored it's data inside. The result was that whenever I tried to run it, it couldn't start. The only solutions I saw were about navigating to host docker daemon's files. However, I'm running docker VM on windows, and I cannot access the files inside VM (MobyLinuxVM).

我正在使用Windows的Docker版本1.12.3 -beta30.1(8711)

I'm using Docker for Windows, version 1.12.3-beta30.1 (8711)

推荐答案

闯入


运行一个具有对MobyLinuxVM的完全root访问权限且没有seccomp配置文件的容器(因此您可以挂载东西)

run a container with full root access to MobyLinuxVM and no seccomp profile (so you can mount stuff)



docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh

https://forums.docker.com/t/how-can-i- ssh-into-the-betas-mobylinuxvm / 10991/6

这篇关于如何从Windows Shell访问Docker VM(MobyLinux)文件系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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