[root@CentOS7_001 hostData]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 91f5fd074ff4 ubuntu "/bin/bash" About a minute ago Up About a minute u2 3be843732232 ba6acccedd29 "/bin/bash" About an hour ago Up About an hour u1 [root@CentOS7_001 hostData]#
## u1容器内 root@3be843732232:/# cd /tmp/ubuntuData/ root@3be843732232:/tmp/ubuntuData# ll total 0 root@3be843732232:/tmp/ubuntuData# touch containerIn.txt root@3be843732232:/tmp/ubuntuData# ll total 4 drwxr-xr-x. 2 root root 50 May 29 02:37 ./ drwxrwxrwt. 1 root root 24 May 29 02:34 ../ -rw-r--r--. 1 root root 0 May 29 02:36 containerIn.txt
## u2容器内 root@91f5fd074ff4:/# cd /tmp/ubuntuData/ root@91f5fd074ff4:/tmp/ubuntuData# ll total 4 drwxr-xr-x. 2 root root 50 May 29 02:37 ./ drwxrwxrwt. 1 root root 24 May 29 03:36 ../ -rw-r--r--. 1 root root 0 May 29 02:36 containerIn.txt root@91f5fd074ff4:/tmp/ubuntuData# touch u2.txt root@91f5fd074ff4:/tmp/ubuntuData# ll total 4 drwxr-xr-x. 2 root root 64 May 29 03:36 ./ drwxrwxrwt. 1 root root 24 May 29 03:36 ../ -rw-r--r--. 1 root root 0 May 29 02:36 containerIn.txt -rw-r--r--. 1 root root 0 May 29 03:36 u2.txt