Skip to content

Instantly share code, notes, and snippets.

@petersellars
Created March 17, 2015 08:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save petersellars/ffa2d63c20e881302493 to your computer and use it in GitHub Desktop.
Save petersellars/ffa2d63c20e881302493 to your computer and use it in GitHub Desktop.
Docker Scripts: Conveniently obtain the PID of a docker container by name or ID
#!/bin/sh
exec docker inspect --format '{{ .State.Pid }}' "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment