Skip to content

Instantly share code, notes, and snippets.

@BretFisher
Last active February 1, 2024 21:57
Show Gist options
  • Star 51 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save BretFisher/ef4070b60ca7380846ff62f3cebd7856 to your computer and use it in GitHub Desktop.
Save BretFisher/ef4070b60ca7380846ff62f3cebd7856 to your computer and use it in GitHub Desktop.
Getting a Shell in the Docker for Windows Moby VM

2018 Update: Easiest option is Justin's repo and image

Just run this from your CLI and it'll drop you in a container with full permissions on the Moby VM. Only works for Moby Linux VM (doesn't work for Windows Containers). Note this also works on Docker for Mac.

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1

@techiechap
Copy link

      When tried to run on the wsl /git bash "the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty"

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