Deploying Java webapp to Tomcat 8 running in Docker container

前端 未结 3 838
青春惊慌失措
青春惊慌失措 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:35

    You are trying to copy the war file to a directory below webapps. The war file should be copied into the webapps directory.

    Remove the mkdir command, and copy the war file like this:

    COPY /1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.war /usr/local/tomcat/webapps/myapp.war
    

    Tomcat will extract the war if autodeploy is turned on.

提交回复
热议问题