[root@VM-0-7-centos ~]# docker volume ls DRIVER VOLUME NAME local 39e68d440c53a251de69252c9e767a0386c88ddcf699d7ba42ec556e8c94d74b
[root@VM-0-7-centos ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 25b3bd3c330b nginx "/docker-entrypoint.…"4 minutes ago Up 4 minutes 0.0.0.0:49153->80/tcp, :::49153->80/tcp jmnginx
[root@VM-0-7-centos _data]# docker run -d -P --name nginx -v jmnginx:/etc/nginx nginx 8052e5458d216512b650455d97713e30fdb0dd31b49e22335cef8bb2a7625532 [root@VM-0-7-centos _data]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8052e5458d21 nginx "/docker-entrypoint.…"8 seconds ago Up 6 seconds 0.0.0.0:49154->80/tcp, :::49154->80/tcp nginx
[root@VM-0-7-centos _data]# docker volume ls DRIVER VOLUME NAME local39e68d440c53a251de69252c9e767a0386c88ddcf699d7ba42ec556e8c94d74b local5940b7fbf8563daefa34a40270ac793bf2b2084d8e6702dc0c2999681542c66d local jmnginx
[root@VM-0-7-centos docker-test-volume]# docker run -it yuanzhou/centos:1.0 /bin/bash [root@d6afa730c9b7 /]# ls volume01 bin dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var volume02