标签:进入 size 使用 exec exe 组合键 root tag comm
[root@localhost ~]# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 5a3221f0137b 10 days ago 126MB
[root@localhost ~]# docker run -it nginx /bin/bash
root@e5f373447c9f:/#
[root@localhost ~]# docker exec -it nginx_1 /bin/bash
root@9da42ad3c93e:/#
[root@localhost ~]# docker exec -it nginx_1 ls
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9da42ad3c93e nginx "/bin/bash" 9 minutes ago Up 9 minutes 80/tcp nginx_1
[root@localhost ~]# docker rename nginx_1 nginx_2
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9da42ad3c93e nginx "/bin/bash" 10 minutes ago Up 10 minutes 80/tcp nginx_2
标签:进入 size 使用 exec exe 组合键 root tag comm
原文地址:https://www.cnblogs.com/xie123/p/11415673.html