1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

手っ取り早くカレントディレクトリのWARをローカルで動かしたい

Last updated at Posted at 2022-05-26

そんなあなたのためのワンライナー

docker run --rm -d --name app -v "$(pwd):/config/dropins" -p 80:9080 -p 443:9443 websphere-liberty:full-java17-openj9

ブラウザで確認

例えばhoge.warだったら以下。

http://localhost/hoge/

ログの確認

docker exec app cat /logs/messages.log

勿論tailでもOK

docker exec app tail -f /logs/messages.log

終了する時

docker stop app

or

docker exec app server stop

どっちにしてもコンテナ消えます。
どっちでもいいですかね。

初回にLibertyのイメージさえ引いておけば、軽いし早いしマウントしなくても docker cp app.war app:/config/dropins/ でデプロイ出来てお手軽なんで最近はよく使ってます。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?