Skip to content

Instantly share code, notes, and snippets.

@dungdt88
Last active April 9, 2016 03:39
Show Gist options
  • Save dungdt88/0f8d25a6c7725d46ec33 to your computer and use it in GitHub Desktop.
Save dungdt88/0f8d25a6c7725d46ec33 to your computer and use it in GitHub Desktop.
## Remove all stopped containers
docker rm $(docker ps -a -q)
## Remove images with <none> tag
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
## Stats of all containers
docker stats $(docker ps | awk '{if(NR>1) print $NF}')
## Allow a user to use docker
sudo usermod -aG docker <user>
## Pull an image
docker pull <docker_registry_host>/<image_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment