Deploying Java webapp to Tomcat 8 running in Docker container

前端 未结 3 840
青春惊慌失措
青春惊慌失措 2020-12-13 05:48

I am pretty new to Tomcat and Docker - so I am probably missing a Tomcat fundamental somewhere in this question.

What I am trying to do is build a Docker container t

3条回答
  •  误落风尘
    2020-12-13 06:18

    Tomcat will only extract the war which is copied to webapps directory. Change Dockerfile as below:

    FROM tomcat:8.0.20-jre8
    COPY /1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.war /usr/local/tomcat/webapps/myapp.war
    

    You might need to access the url as below unless you have specified the webroot

    http://192.168.59.103:8888/myapp/getData

提交回复
热议问题