LoginSignup
3
6

More than 5 years have passed since last update.

DockerでTOMCATを立てる

Last updated at Posted at 2017-10-18

TOMCATの起動

docker run -d -p 8000:8080 tomcat:8.0

ベーシック認証の有効化

docker環境に入り

bash -c "clear && docker exec -it nostalgic_mestorf bash"

vimをインストール

apt-get update
apt-get install vim

tomcat-users.xmlを編集

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

以下を追加

<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="admin" password="password" roles="manager-gui,manager-script" />

これでadmin passwordでログインできるようになります。

再起動して設定を有効化

docker restart {コンテナ名}

127.0.0.1:8000にアクセスしてログインできれば設置完了

3
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
6