Docker Community Forums

Share and learn in the Docker community.

What are the instructions to place a java file in tomcat image


(docker learner) #1

Hi, I am trying to include some java files in tomcat image and I think I got stuck in giving
correct instructions in dockerfile. Please help me out in solving this.

my dockerfile:
FROM tomcat

COPY ng-registration-services-0.0.1.war/ /usr/local/tomcat/webapps/

CMD /usr/local/tomcat/bin/catalina.sh start && tail -f /usr/local/tomcat/logs/catalina*.out

required java files are inside that ng-registration-services war file.

Please guide me
Thanks


(Nickdoikov) #2

Try to add config for tomcat with proper path to your war files.
Maybe it needs to add some env variables . Check tomcat image release notes.


(docker learner) #3

thanks for your reply, I am new to docker and can’t find it out what you said, So can you explain it in more brief


(Nickdoikov) #4

google can helps you %)

https://hub.docker.com/_/tomcat/