Docker commands
✅ ccreate image, container and run container
1
2
3
-- create image, container and run container
docker run nginx
docker run mysql
✅ Image commands
- can download images in dockerhub.com
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- download image
docker pull nginx
-- get image, check downloaded image
docker image ls
-- delete image
docker image rm
-- force delete image
docker image rm -f
-- delete all images
docker image rm $(docker images -q)
✅ Container commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- create container
docker create nginx
docker create mysql
-- get all created containers
docker ps -a
-- start the container
-- now ps -a STATUS would be "up"
docker start
-- stop container
docker stop
-- remove container
docker rm
✅
✅
✅
✅
✅
✅
✅
✅
This post is licensed under CC BY 4.0 by the author.