Skip to content

Instantly share code, notes, and snippets.

@wader
Last active April 8, 2019 15:11
Show Gist options
  • Save wader/1a5639aa6699b2b2e0ef6155ca06d3d3 to your computer and use it in GitHub Desktop.
Save wader/1a5639aa6699b2b2e0ef6155ca06d3d3 to your computer and use it in GitHub Desktop.
docker container with full privileges and no namepaces
docker run -ti --rm --user=0 --privileged --pid=host --userns=host --uts=host --network=host --ipc=host -v /:/host_root <image>
not much of a "container" but very useful for debugging
if you run this on docker for mac /host_root will be the root of the linuxkit vm and not your mac
@wader
Copy link
Author

wader commented Apr 8, 2019

Note that if you use this with strace the trace output might be confusing as the pid namespaces messes things up

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