Last active
October 6, 2019 22:32
-
-
Save 6ui11em/513b91c5579f552d479831abd1ae2b3f to your computer and use it in GitHub Desktop.
Docker useful commands #docker #commands #unix
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
# List all containers | |
$ docker ps -a | |
# List started containers | |
$ docker ps | |
# List stopped containers | |
docker ps --filter "status=exited" | |
# Stop container | |
docker stop <container_name> | |
# Start docker compose file | |
docker-compose up | |
# Start container | |
docker start <container_name> | |
# Stop all runing containers | |
docker stop $(docker ps -a -q) | |
# Delete all existing containers | |
docker rm $(docker ps -a -q) | |
# Delete all existing images | |
docker rmi $(docker images -q -a) | |
# Access to contanier | |
docker exec -ti <container_name> bash | |
# Show docker logs | |
docker logs -f <container_name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment