Skip to content

Instantly share code, notes, and snippets.

@avitsidis
Created February 10, 2017 15:24
Show Gist options
  • Save avitsidis/24b3519f6451fee4e726f85635139dcf to your computer and use it in GitHub Desktop.
Save avitsidis/24b3519f6451fee4e726f85635139dcf to your computer and use it in GitHub Desktop.
SSH into mobylinux (docker for windows)
#based on po75558Manuel Patrone comment on https://forums.docker.com/t/how-can-i-ssh-into-the-betas-mobylinuxvm/10991/8
#get a privileged container with access to Docker daemon
docker run --privileged -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker alpine sh
#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
#switch to host FS
chroot /host
@Mart-Bogdan
Copy link

Also works for Google Container Optimized OS, as it lacks any applications installed on host.

Now can use htop on google container OS.
Thanks, @avitsidis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment