Andrei
Andrei

Reputation: 312

Can't find manager application in a tomcat9 from docker

When I run a tomcat docker image: docker run -it --rm tomcat:9.0

it starts properly so I can see some output from http://localhost:8080/ if I go to http://localhost:8080/manager/html it returns 404 and there is no manager application under /usr/local/tomcat/webapps. I think I am missing something, how do I enable the manager application?

Upvotes: 1

Views: 1886

Answers (1)

atline
atline

Reputation: 31584

there is no manager application under /usr/local/tomcat/webapps

This is because by default the contents in webapps moved to webapps.dist:

root@0a08d2dcf78e:/usr/local/tomcat/webapps.dist# ls
ROOT  docs  examples  host-manager  manager

tomcat dockerhub mentioned the reason as next:

Note: as of docker-library/tomcat#181, the upstream-provided (example) webapps are not enabled by default, per upstream's security recommendations, but are still available under the webapps.dist folder within the image to make them easier to re-enable.

So, for you, you need do next to make it work:

cp -avT $CATALINA_HOME/webapps.dist/manager $CATALINA_HOME/webapps/manager

Upvotes: 5

Related Questions