==================== docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
Note this isn't a list of commands to run in order. The first one gets you in the VM (hit return twice
to see a prompt). Then other commands are for managing that connection. Not a great CLI expirence but gets
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
Ctrl-a d
screen -ls
reconnect to that session (don't open a new one, that won't work and 2nd tty will give you garbled screen)
screen -r
Ctrl-a k
docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
it’s running a container (using the debian image..nothing special about it other than it apparently has
nsenter installed), with pid=host (so you are in the process space of the mini VM running Docker4Mac),
and then nsenter says “whatever is pid 1, use that as context, and enter all the namespaces of that, and run a shell there"
docker run -it --rm --privileged --pid=host justincormack/nsenter1