# docker常用命令

# 查看Docker容器使用资源情况

# --format 选项自定义输出的内容和格式:

docker stats --format "table{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}"

.Container    根据用户指定的名称显示容器的名称或 ID。

.Name           容器名称。

.ID                 容器 ID。

.CPUPerc       CPU 使用率。

.MemUsage  内存使用量。

.NetIO           网络 I/O。       

.BlockIO        磁盘 I/O。

.MemPerc     内存使用率。

.PIDs             PID 号。

# 容器生命周期管理

run
start/stop/restart
kill
rm
pause/unpause
create
exec

# 容器操作

ps
inspect
top
attach
events
logs
wait
export
port

# 容器rootfs命令

commit
cp
diff
镜像仓库
login
pull
push
search

# 本地镜像管理

images
rmi
tag
build
history
save
import
info|version
info
version
Last Updated: 8/20/2019, 6:09:38 PM