Skip to content

Instantly share code, notes, and snippets.

@pawl
Created June 28, 2015 00:53
Show Gist options
  • Save pawl/722cb52669f1643f6a78 to your computer and use it in GitHub Desktop.
Save pawl/722cb52669f1643f6a78 to your computer and use it in GitHub Desktop.
Automatically remove docker containers for long-running jobs
PID=$(docker run -d "$@")
docker wait $PID
docker rm $PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment