Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access the docker VM (MobyLinux) filesystem from windows shell?

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

docker exec -it bash

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).

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

like image 267
Łukasz Podolak Avatar asked Nov 29 '16 13:11

Łukasz Podolak


1 Answers

Hack your way in

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

like image 54
KCD Avatar answered Oct 20 '22 01:10

KCD