标签:hello roc csdn exit 声明 cpu time status .net
实战
[root@localhost ~]# 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
[root@localhost ~]# 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
[root@localhost ~]# 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
[root@localhost ~]# 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
[root@localhost ~]# docker top 9f
UID PID PPID C STIME TTY TIME CMD
root 8220 8206 0 10:59 pts/0 00:00:00 sh
[root@localhost ~]# docker diff 9f
C /root
A /root/.ash_history
[root@localhost ~]# docker attach 9f
/ # ls
bin dev etc home proc root sys tmp usr var
[root@localhost ~]# docker cp 33.tar 9f:/root/
[root@localhost ~]# docker attach 9f
/ # ls
bin dev etc home proc root sys tmp usr var
/ # cd root
~ # ls
33.tar
[root@localhost ~]# docker diff 9f
C /root
A /root/.ash_history
A /root/33.tar
[root@localhost ~]# docker cp 9f:/root/.ash_history ./
[root@localhost ~]# cat ./.ash_history
ls
top
ls
exit
ls
exit
ls
cd root
ls
[root@localhost ~]#
---------------------
作者:chengqiuming
来源:CSDN
原文:https://blog.csdn.net/chengqiuming/article/details/78975890
版权声明:本文为博主原创文章,转载请附上博文链接!
标签:hello roc csdn exit 声明 cpu time status .net
原文地址:https://www.cnblogs.com/duanxz/p/10247509.html