List available subcommands
Display system-wide information
List the images that have been downloaded to your computer
List active containers
List all (actives and inactives) containers
Docker remove image
Note : you can see the image:tag list using the command ‘docker images’
Docker run command on container
#print debian /etc/issue
docker run debian cat /etc/issue |
#print debian /etc/issue
docker run debian cat /etc/issue
Docker destroy all Containers and Images
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q) |
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
Get a shell on a running container
# by id
docker exec -i -t df571832c97c /bin/bash
# by name
docker exec -i -t prettyname /bin/bash |
# by id
docker exec -i -t df571832c97c /bin/bash
# by name
docker exec -i -t prettyname /bin/bash
Docker save image
docker save mariadb -o /opt/docker/mysavedimagesql |
docker save mariadb -o /opt/docker/mysavedimagesql
Docker import saved image
docker import /opt/docker/mysavedimagesql |
docker import /opt/docker/mysavedimagesql