Last active
September 17, 2023 03:21
-
-
Save pm-hwks/0cf53849c78910f8a4968a380623824d to your computer and use it in GitHub Desktop.
[Docker Commands] Docker Commands #docker #commands #cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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