Created
February 10, 2017 15:24
-
-
Save avitsidis/24b3519f6451fee4e726f85635139dcf to your computer and use it in GitHub Desktop.
SSH into mobylinux (docker for windows)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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