systemctl start docker
docker version
docker info
docker inspect redis
docker system df
docker system events
docker system info
docker system info --format '{{json .}}'
docker system prune
docker system prune --force
docker system prune --force --volumes
docker search centos
docker search centos --filter=stars=3000
docker search centos --limit=2
docker search centos --filter=stars=3000 --limit=2
docker pull centos
docker pull centos:centos7.9.2009
docker images
docker images centos
docker images centos:latest
docker images -aq
docker rmi feb5d9fea6a5
docker rmi -f feb5d9fea6a5
docker rmi hello-world:latest
docker rmi hello-world:latest
docker history ubuntu
docker run -it centos
docker run --name=centos01 -it centos
docker run --name=centos02 -l mycentos -it centos
docker ps
docker ps -a
docker ps -aq
docker ps --last 1
docker ps -aq --last 1
docker ps -s
docker ps --filter 'name=test-centos'
docker rename cool_leakey centos03
docker rm centos03
docker rm $(docker ps -aq)
docker rm -f centos03
docker stop fb37d2aba985
docker start fb37d2aba985
docker restart fb37d2aba985
docker kill 1cb14279979d
docker attach centos02
docker exec -it 69a9727b7ff4 /bin/bash
docker top test-centos
docker logs -f centos04
docker cp 0d54239dc924:/home/test.go /home/
docker cp ./home/a.go 0d54239dc924:/home
docker的相关操作命令还有很多,这里只是象征性的列出来一些,最好是去docker的官方文档熟悉一遍,用的时候也可以有个印象,然后再系统的研究相应命令的意思。
https://docs.docker.com/engine/reference/run/