-
Show all images docker images
-
Show all running containers docker ps
-
Show all running and stopped containers docker ps -a
-
Run an container docker run image-name
-
Run an container in detached mode docker run -d image-name
-
Stop all running containers docker kill $(docker ps -q)
-
Delete all stopped containers docker rm $(docker ps -a -q)
-
Delete all images docker rmi $(docker images -q)
-
Force delete images docker rmi -f $(docker images -q)
-
Port mapping docker run -p host_port:docker_port image-name
-
Volume mapping docker run -v host_volume:docker_volume image-name
-
Run commands inside container docker exec container-id command
-
Go inside container docker exec -it container-id bash
-
Inspect a container (eg. to find internal ip of container, image it is using etc) docker inspect container-id
-
View all networks docker network ls
-
Delete a network docker network rm netowork-name
Created
December 21, 2018 23:42
-
-
Save israeljrs/34fa855e5a12136662ef8117e427d596 to your computer and use it in GitHub Desktop.
Docker commands
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment