如何在docker tomcat 8中更改用户配置? [英] How to change user config in docker tomcat 8?

查看:208
本文介绍了如何在docker tomcat 8中更改用户配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用docker快速启动终端,我已经启动了一个tomcat容器,它正在运行,我可以打开tomcat主页。但是我无法使用默认用户名: admin密码: admin打开管理器应用。我该如何更新Tomcat的配置?

Using docker quick start terminal I have started a tomcat container and it is running and i can able to open the tomcat homepage. But i can't able to open the manager app by using default username:"admin" password:"admin". How can i update the config of tomcat??

推荐答案

从文档 https://hub.docker.com/_/tomcat/
配置文件位于/ usr / local / tomcat中/ conf /。默认情况下,操作 / manager / html Web应用程序所需的 manager-gui角色中没有用户。如果要使用此应用程序,则必须在tomcat-users.xml中定义这样的用户。

from the doc https://hub.docker.com/_/tomcat/: The configuration files are available in /usr/local/tomcat/conf/. By default, no user is included in the "manager-gui" role required to operate the "/manager/html" web application. If you wish to use this app, you must define such a user in tomcat-users.xml.

如果需要,可以将主机中的此文件夹替换为运行中的卷( docker run [...] -v / your / conf /:/ usr / local / tomcat / conf / [...]

If you want, you can replace this folder from your host with a volume in your run (docker run [...] -v /your/conf/:/usr/local/tomcat/conf/ [...])

这篇关于如何在docker tomcat 8中更改用户配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆