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:
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>
Now, we are going to use the image available in Docker Hub and add
tomcat-sers.xml
to/usr/local/tomcat/conf/tomcat-users.xml
. Create a Dockerfile, as shown here:FROM tomcat:8.0...