docker container

docker 容器操作

常用

参数描述
-a,–attach listAttach to STDIN, STDOUT or STDERR
-c,–cpu-shares intCPU shares (relative weight)
-d,–detachRun container in background and print container ID
-e,–env listSet environment variables
-h,–hostname stringContainer host name
-i,–interactiveKeep STDIN open even if not attached
-l,–label listSet meta data on a container
-m, --memory bytesMemory limit
-p, --publish listPublish a container’s port(s) to the host
-P, --publish-allPublish all exposed ports to random ports
-t, --ttyAllocate a pseudo-TTY
-u, --user stringUsername or UID (format: <name
-v, --volume listBind mount a volume
-w, --workdir stringWorking directory inside the container
参数描述
–name stringAssign a name to the container

使用

docker container COMMAND

命令描述
docker container attach进入正在运行的容器
docker container commit保存现在的容器为镜像
docker container cp拷贝镜像中的稳健
docker container create创建新的容器
docker container diffInspect changes to files or directories on a container’s filesystem
docker container exec在指定容器中运行命令
docker container export导出容器为 a tar archive
docker container inspect查看容器的具体信息
docker container killKill one or more running containers
docker container logs查看容器的日志
docker container ls列出所有容器
docker container pausePause all processes within one or more containers
docker container port列出所有的端口
docker container prune删除所有停止的容器
docker container rename重命名容器
docker container restart重启容器
docker container rm删除容器
docker container runRun a command in a new container
docker container startStart one or more stopped containers
docker container statsDisplay a live stream of container(s) resource usage statistics
docker container stopStop one or more running containers
docker container topDisplay the running processes of a container
docker container unpauseUnpause all processes within one or more containers
docker container updateUpdate configuration of one or more containers
docker container waitBlock until one or more containers stop, then print their exit codes

参考文献:
https://docs.docker.com/engine/reference/commandline/container/#child-commands

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值