Skip to content

Instantly share code, notes, and snippets.

@pm-hwks
Last active September 17, 2023 03:21
Show Gist options
  • Save pm-hwks/0cf53849c78910f8a4968a380623824d to your computer and use it in GitHub Desktop.
Save pm-hwks/0cf53849c78910f8a4968a380623824d to your computer and use it in GitHub Desktop.
[Docker Commands] Docker Commands #docker #commands #cheatsheet
#Prune all unused docker resources
docker system prune
# Stop all docker containers
docker container stop $(docker container ls -aq)
# Remove all stopped containers
docker container rm $(docker container ls -aq)
# Docker hub login
docker login --username=pmabcd
# Docker hub push
docker tag 706ec967bf1e abc/ansible:v1
# Docker hub push
docker push abc/ansible:v1
# Docker prune images
docker image prune -a
# ctop - top like utility for containers
docker run --rm -ti --name=ctop --volume /var/run/docker.sock:/var/run/docker.sock:ro quay.io/vektorlab/ctop:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment