4
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

DockerでTomcatサーバを立ててみた

Posted at

あらまし

Webアプリを作成するためにDockerを使用してサーバを立ててみることにしました.
ゆくゆくはこれを土台にWebアプリを作成したいです.

環境

開発環境

  • mac

設定環境

  • Tomcat 9.0
  • JDK21

dockerをInstallする

docker engineを動かすために

docker engineはLinuxカーネル依存のため,dockerをインストールするためにVMをインストールします.

導入する際,参考になった記事です.

Docker Desktopをインストールした場合は,同時にインストールされているため,VMを入れる手順は不要です.

Tomcatを起動する

まずTomcatイメージをローカルにプルします.

docker pull tomcat

イメージをプルできたら以下コマンドで起動する.

docker run tomcat

以下urlにアクセスしてページが表示されればOK!

↓以下のようなエラーページが表示されてもTomcatサーバのページなので,Tomcatサーバが起動している証拠です.
Tomcatエラーページ.png

4
9
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
4
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?