[root@localhost ~]# docker cp /opt/web/docker_cp.txt tomcat9093:/usr/local/apache-tomcat-9.0.31/ [root@localhost ~]# docker exec tomcat9093 ls -l /usr/local/apache-tomcat-9.0.31 total 128 -rw-r-----. 1 root root 18982 Feb 5 19:36 BUILDING.txt -rw-r-----. 1 root root 5409 Feb 5 19:36 CONTRIBUTING.md -rw-r-----. 1 root root 57092 Feb 5 19:36 LICENSE -rw-r-----. 1 root root 2333 Feb 5 19:36 NOTICE -rw-r-----. 1 root root 3255 Feb 5 19:36 README.md -rw-r-----. 1 root root 6898 Feb 5 19:36 RELEASE-NOTES -rw-r-----. 1 root root 16262 Feb 5 19:36 RUNNING.txt drwxr-x---. 2 root root 4096 Feb 5 19:36 bin drwx------. 1 root root 22 Mar 9 07:27 conf -rw-r--r--. 1 root root 96 Mar 12 01:23 docker_cp.txt drwxr-x---. 2 root root 4096 Feb 5 19:33 lib drwxr-xr-x. 2 root root 197 Mar 9 07:27 logs drwxr-x---. 2 root root 30 Feb 5 19:34 temp drwxr-xr-x. 2 root root 6 Mar 9 07:27 webapps drwxr-x---. 2 root root 6 Feb 5 19:32 work [root@localhost ~]# #tomcat9093 是窗口名,也可以用 容器ID,