Docker部署tomcat9
1. [root@VM-16-3-centos ~]# docker run -d -p 8080:8080 tomcat
2. [root@VM-16-3-centos ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5beb0b5b2298 tomcat "catalina.sh run" 4 seconds ago Up 3 seconds 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp peaceful_curie
05ce8c485539 nginx "/docker-entrypoint.…" 24 minutes ago Up 24 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp affectionate_jang
3. [root@VM-16-3-centos ~]# docker exec -it 5beb0b5b2298 /bin/bash
4. root@5beb0b5b2298:/usr/local/tomcat# cd webapps.dist
5. root@5beb0b5b2298:/usr/local/tomcat/webapps.dist# cp -r * ../webapps/
6. 通过浏览器访问服务器ip:8080端口,能显示tomcat界面即表示部署ok.
专注才能创造非一般的价值!
如有技术商务合作,请联系微信: 13162518256