DOCKER
less than 1 minute read
Discover DOCKER CLI
List containers
Stop containers
Remove containers
Stop and Remove all containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
kill all running containers
docker kill $(docker ps -q)
List images
Remove images
delete all images
docker rmi $(docker images -q)
Fetch the logs of a container
Remove all unused local volumes
Enter image
docker run -it IMAGE_ID bash
Enter container
docker exec -it CONTAINER_NAME bash
List container volumes
docker inspect -f '{{ .Mounts }}' CONTAINER_NAME
Leave a comment