Skip to content

Instantly share code, notes, and snippets.

@giskou
Forked from jongio/ssh-info-docker-vm-windows.sh
Last active January 23, 2020 09:29
Show Gist options
  • Save giskou/5310e4c6053019d2c6a93b1604e89ba1 to your computer and use it in GitHub Desktop.
Save giskou/5310e4c6053019d2c6a93b1604e89ba1 to your computer and use it in GitHub Desktop.
Get shell with root access to the VM that runs Docker on your Windows host.
#!/usr/bin/env bash
exec docker run --privileged --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /usr/local/bin/docker:/usr/local/bin/docker alpine docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine chroot /host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment