WebSphere Application Server traditionalをDockerで起動してみる

はじめに

WebSphere Application Server traditionalを起動してみました。
所々苦労したのでメモ。

環境

  • Docker version 18.09.7

使う前に知っておくべきこと

そもそもWebSphere Application Server traditionalって?

IBM WebSphere Application Server Libertyではない方のWebSphere Application Serverを traditionalと呼びます*1

WebSphere Application Server traditionalのDockerイメージの説明

以下に存在します。

ライセンス

ibmcom/websphere-traditionalの下部のリンクに説明があります。

使う際の注意点

起動にちょっと時間かかる

ibmcom/websphere-traditionalに記載のコマンドを実行しても、すぐは使えません。
起動に時間がかかります。dockerのログをみて出力が落ち着くまで待ちます。 手元で試したところ、以下のログがでたら起動しているようです。*2

{"type":"was_message","host":"was","ibm_cellName":"DefaultCell01","ibm_nodeName":"DefaultNode01","ibm_serverName":"server1","ibm_sequence":"1569160254517_000000000011A","message":"CWPKI0037I: Expiration monitor reports the following information: \n**** Subject:  Expiration Monitor ****; \n\nHostname: was\nProfile UUID: AppSrv01-BASE-1389585a-6c06-4875-bab5-66f7452fd309\nProcess type: UnManagedProcess\n\nChecking for expired certificate and certificates in the 60 days threshold period.\n\nCWPKI0735I: All certificates were searched and no expiration issues were found.\n.","ibm_datetime":"2019-09-22T13:50:54.517+0000","ibm_messageId":"CWPKI0037I","ibm_threadId":"0000006e","module":"com.ibm.ws.crypto.config.WSNotifier","loglevel":"INFO"}
{"type":"was_message","host":"was","ibm_cellName":"DefaultCell01","ibm_nodeName":"DefaultNode01","ibm_serverName":"server1","ibm_sequence":"1569160254610_000000000011B","message":"ADMR0016I: User defaultWIMFileBasedRealm\/server:DefaultCell01_DefaultNode01_server1 modified document cells\/DefaultCell01\/security.xml.","ibm_datetime":"2019-09-22T13:50:54.610+0000","ibm_messageId":"ADMR0016I","ibm_threadId":"0000006e","module":"com.ibm.ws.management.repository.FileRepository","loglevel":"AUDIT"}
管理コンソールのURLはちゃんと ibmcom/websphere-traditionalに記載されているURLを叩く

以下のURLを叩きます。


「コンテキストパスなしでも何か出るだろー」とかおもって、https://localhost:9043/を叩いても何も出ません。

ibmcom/websphere-traditionalに記載されているポートだけ開けても、デプロイしたアプリにアクセスできない

ibmcom/websphere-traditionalには記載されていないですが、アプリには9043ではないポートを使用してアクセスします。
defaulthostにデプロイする場合、デフォルトでは9080を使用してアクセスします。

よって、実際のDockerコマンドは以下のような感じになります。

docker run --name test -h test -v $(pwd)/PASSWORD:/tmp/PASSWORD -p 9043:9043 -p 9443:9443 -p 9080:9080 -d ibmcom/websphere-traditional:9.0.5.0

WebSphere Application Server traditionalが使っているポート番号を調べたい場合は、以下が参考になります。

さいごに

普通にインストールするよりは格段に楽に起動まで出来ましたので、Dockerを使って起動するのおすすめです。

*1:IBM WebSphere Application Server (WAS) | 製品・ソリューション | エヌアイシー・パートナーズ株式会社

*2:止めたコンテナを再開したときは、また別のログがでるのですが割愛します。