Public Repository

Last pushed: 2 years ago
Short Description
A basic Tomcat7 install on Oracle java.
Full Description

A standard Tomcat7 install.
You only have to deploy your war file in /var/lib/tomcat7/webapps.

Note this is a very basic example! replace HelloWorld.war with your own war file.

Your Dockerfile should look something like this:

FROM sonnyburnett/tomcat7:v1

EXPOSE 8080

COPY HelloWorld.war/ /var/lib/tomcat7/webapps/HelloWorld.war

CMD service tomcat7 start && tail -f /var/log/tomcat7/catalina.out

to build the image use: docker build -t sonnyburnett/helloworld .

to run: docker run -d --privileged -p 8080 sonnyburnett/helloworld

to view in browser: <ip>:8080/helloworld

Note: With >_ docker inspect <key> | grep IPA

you can see the ip of the container. You can also bind the port to the host:

docker run -d --privileged -p 8081:8080 sonnyburnett/helloworld

to view in browser: localhost:8081/helloworld

Docker Pull Command
Owner
sonnyburnett

Comments (0)