Repository files navigation
docker --version : Check docker version
docker pull nameimage:tag : pull a image from dockerhub
docker images : Show all images in docker
docker run [imageName] : run a container
docker rmi [imageName] : Remove a image
docker rmi $(docker images -q) : Delete All images
docker ps : Show all container is running
docker ps -a : Show all container is running and stop
docker start [containerId] : Start container when it is stop
docker stop [containerId] : Start container when it is start
docker restart [containerId] : Restart a container
docker rm [containerId] : Remove a container when it is stop
docker stop $(docker ps -a -q) : Stop all container is running
docker rm $(docker ps -a -q) : Delete All container
docker container attach containerid : Go to terminal container is running
CTRL + P + Q : Exit terminal, but container is running
docker history name_or_id_of_image : The history of container or images
docker diff container-name-or-id : diff
docker logs -f container-name-or-id : Log container
docker stats container-name-or-id : Stats
docker network ls: Show all list networks
docker network create --driver [driverOption] networkName : Create a network
driverOption:
docker network disconnect : Disconnect a container from a network
docker network inspect : Display detailed information on one or more networks
docker network prune : Remove all unused networks
docker network rm : Remove one or more networks
docker-compose up --build -d : run file docker-compose.yml
docker-compose down : Stop and delete container
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
You can’t perform that action at this time.