docker命令大全记录表
Docker 命令大全记录表是一种用于查看和管理 Docker 容器的工具,它可以帮助用户快速了解 Docker 的各种命令,并且可以更好地使用 Docker 来实现自己的目标。
docker run -it --name my_container ubuntu:18.04 bash # 启动一个新的容器,并进入bash控制台
docker start my_container # 启动一个已存在的容器
docker stop my_container # 停止一个正在运行的容器
docker rm my_container # 删除一个已存在的容器
docker ps -a # 查看所有正在运行或者已经停止的容器信息
docker images # 查看本机上所有镜像信息
docker pull ubuntu:18.04 # 从Docker Hub上拉取ubuntu 18.04镜像到本地
docker rmi ubuntu:18.04 # 删除本地ubuntu 18.04镜像
docker exec -it my_container bash # 进入my_container容器内部bash控制台
Docker 命令大全
容器生命周期管理
- run
- start/stop/restart
- kill
- rm
- pause/unpause
- create
- exec
容器操作
- ps
- inspect
- top
- attach
- events
- logs
- wait
- export
- port
容器rootfs命令
镜像仓库
本地镜像管理
- images
- rmi
- tag
- build
- history
- save
- import
info|version