• No products in the cart.

DevOps on AWS – Docker Exercise with Maven and Tomcat

Download Tomcat and Maven Images:

>> docker pull tomcat

>> docker pull maven

Create a Project:

>> docker run –rm -it -v $(pwd):/project -w /project maven mvn archetype:generate

>> cd /DockerExample

Build Project:

>> docker run –rm -it -v $(pwd):/project maven mvn clean package -f /project

Run the Tomcat Server:

>> docker run -it
    -p 8080:8080
    -v $(pwd)/target/DockerExample.war:/usr/local/tomcat/webapps/docker-example.war
    –name Server tomcat

Run the Application as Root App:

>> docker run -it
    -p 8080:8080
    -v $(pwd)/target/DockerExample.war:/usr/local/tomcat/webapps/ROOT.war
    -v $(pwd)/target/DockerExample:/usr/local/tomcat/webapps/ROOT
    –name Server1 tomcat

February 22, 2021

Contact Address

Rise ‘n’ Shine Technologies:
Third Floor, Plot No1(Part), near KPHB Metro Station, KPHB Bagyanagar Colony, Kukatpally Main road, Balanagar Mandal, Rangareddy Dist-500072

Landmarks : Above VIOLET & PURPLE, near PJR statue, kphb metro station

  8686 98 8042


All rights reserved.
error: Alert: Content is protected !!