基本命令
❖查看版本信息:docker version
❖查看系统信息:docker info
镜像管理
❖查看所有镜像:docker images
❖ 搜索镜像:docker search nginx
❖ 拉取下载:docker pull nginx:latest
❖ 导出:docker save nginx > nginx.tar
❖ 导⼊:docker load < busybox.tar
❖ 删除:docker rmi nginx:latest
❖ 更改镜像名:docker tag nginx:latest nginx:test
❖ 查看镜像创建历史:docker history nginx
容器管理
❖ 运⾏容器:docker run -d --name=busybox busybox:latest ping 114.114.114.114
❖ 查看运⾏的容器:docker ps,docker ps -a
❖ 查看容器中运⾏的进程:docker top busybox
❖ 查看资源占⽤:docker stats busybox
❖ 容器:docker start/restart/stop/kill busybox
❖ 暂停容器:docker pause/unpause busybox
❖ 强制删除容器:docker rm -f busybox
❖ 执⾏命令:docker exec -it busybox ls
❖ 复制⽂件:docker cp busybox:/etc/hosts hosts
❖ 查看容器⽇志:docker logs -f busybox
❖ 查看容器/镜像的元信息:docker inspect busybox
❖ 格式化输出:docker inspect -f '{{.Id}}' busybox
❖ 查看容器内⽂件结构:docker diff busybox
标签:容器,查看,busybox,nginx,常用命令,镜像,docker From: https://www.cnblogs.com/margret/p/16279996.html