Skip to content

Instantly share code, notes, and snippets.

@nizq
Created November 27, 2016 13:35
Show Gist options
  • Select an option

  • Save nizq/4dba16fa60c4c87eba3b53219cd17a3c to your computer and use it in GitHub Desktop.

Select an option

Save nizq/4dba16fa60c4c87eba3b53219cd17a3c 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