O'Reilly logo

DevOps for Web Development by Mitesh Soni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Docker containers

Docker containers are extremely lightweight. We are going to use Tomcat as a web application server to deploy the PetClinic application. Docker Hub already has the Tomcat image, so we are not going to configure too many things except users for accessing the Tomcat manager app:

  1. To Tomcat-users.xml, an add role and user, as follows:

    <?xml version='1.0' encoding='utf-8'?> 
    <tomcat-users xmlns="http://tomcat.apache.org/xml" 
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                  xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" 
                  version="1.0"> 
     
    <role rolename="manager-gui"/> 
    <user username="admin" password="admin@123" roles="manager-gui"/> 
     
    </tomcat-users> 
    

  2. Now, we are going to use the image available in Docker Hub and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required