Update: cleaning and direct indication of the problem and solution.
Problem:
Docker-tomcat was installed and launched correctly, with the exception of the 403 Access error in the Manager application. It also seems that my docker tomcat cannot find my tomcat-users.xml configuration.
Decision
Thanks Farhad and Sanket for answers.
[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 user 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" > </Context>
[STEPS AND TEAMS]:
Docker image for assembly
docker build -t borgymanotoy / my-tomcat-docker.
Run the image (my-tomcat-docker and set the port to 8088)
docker run --name my-tomcat-docker-container -p 8088: 8080 -it -d borgymanotoy / my-tomcat-docker
Go to bash container (to check files inside container via bash)
docker exec -it biyahe-tomcat-docker-container bash
source share