docker stats top diff和cp

Posted duanxz

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker stats top diff和cp相关的知识,希望对你有一定的参考价值。

实战
[[email protected] ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1fb916fb0e13 6a "sh" About an hour ago Created hello2
9fb1ff8de577 6a "sh" About an hour ago Up About an hour hello
[[email protected] ~]# docker stats
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9fb1ff8de577 0.00% 52KiB / 993MiB 0.01% 648B / 0B 0B / 0B 0
^C
[[email protected] ~]# docker stats -a
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
1fb916fb0e13 0.00% 0B / 0B 0.00% 0B / 0B 0B / 0B 0
9fb1ff8de577 0.00% 52KiB / 993MiB 0.01% 648B / 0B 0B / 0B 0
^C
[[email protected] ~]# docker stats 9f
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9f 0.00% 52KiB / 993MiB 0.01% 648B / 0B 0B / 0B 0
^C
[[email protected] ~]# docker top 9f
UID PID PPID C STIME TTY TIME CMD
root 8220 8206 0 10:59 pts/0 00:00:00 sh
[[email protected] ~]# docker diff 9f
C /root
A /root/.ash_history
[[email protected] ~]# docker attach 9f
/ # ls
bin dev etc home proc root sys tmp usr var
[[email protected] ~]# docker cp 33.tar 9f:/root/
[[email protected] ~]# docker attach 9f
/ # ls
bin dev etc home proc root sys tmp usr var
/ # cd root
~ # ls
33.tar
[[email protected] ~]# docker diff 9f
C /root
A /root/.ash_history
A /root/33.tar
[[email protected] ~]# docker cp 9f:/root/.ash_history ./
[[email protected] ~]# cat ./.ash_history
ls
top
ls
exit
ls
exit
ls
cd root
ls
[[email protected] ~]#
---------------------
作者:chengqiuming
来源:CSDN
原文:https://blog.csdn.net/chengqiuming/article/details/78975890
版权声明:本文为博主原创文章,转载请附上博文链接!

以上是关于docker stats top diff和cp的主要内容,如果未能解决你的问题,请参考以下文章

stat /cut /grep/diff/find/tar/

stat /cut /grep/diff/find/tar/

让 git diff --stat 显示完整的文件路径

11.15 文本编辑命令catmoreheadtail tr wc stat cut diff

Docker命令学习

docker常用的命令