Public Repository

Last pushed: 9 months ago
Short Description
tomcat 8.5.11
Full Description

Image for Tomcat 8 with
port : 8080
user : zealtech / {default password}.

#[STEPS & COMMANDS]:

-* For Build Docker Image
$docker build -t zealtech/tomcat8 .

-Run Image (my-tomcat-docker and set port to 8088)
$docker run --name tomcat8-container -p 8080:8080 -it -d zealtech/tomcat8

-[Not use] Go to the container's bash (to check files inside the container thru bash)
$docker exec -it biyahe-tomcat-docker-container bash

Copy conf/context.xml command

$docker cp conf/context.xml tomcat8-container:/user/local/tomcat/conf/

** If you want to add datasource in conf/context.xml
please contact korn@zealtechinter.com.

=================================================
http://stackoverflow.com/questions/42692206/docker-tomcat-users-configuration-not-working

[Files]:

Dockerfile


FROM tomcat:8.5.11
MAINTAINER Borgy Manotoy borgymanotoy@ujeaze.com

Update Apt and then install Nano editor (RUN can be removed)

RUN apt-get update && apt-get install -y \
nano \
&& mkdir -p /usr/local/tomcat/conf

Copy configurations (Tomcat users, Manager app)

COPY tomcat-users.xml /usr/local/tomcat/conf/

COPY context.xml /usr/local/tomcat/webapps/manager/META-INF/

Tomcat Users Configuration (conf/tomcat-users.xml)


<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"/>
<role rolename="manager-script"/>
<user username="admin" password="password" roles="manager-gui,manager-script" />

</tomcat-users>

Application Context (webapps/manager/META-INF/context.xml)


<?xml version="1.0" encoding="UTF-8"?>

<Context antiResourceLocking="false" privileged="true" >
<!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->

</Context>

Docker Pull Command
Owner
zealtech