1

I am new to docker. I want to run my java application on tomcat server using docker images/containers. Can anyone suggest best method to do that?

Miki
  • 2,493
  • 2
  • 27
  • 39
Bhim singh dangi
  • 417
  • 1
  • 5
  • 12

1 Answers1

3

First find a docker image with the version of tomcat you want. You can search docker images using, docker search so try

docker search tomcat

next pull it locally

docker pull <your/image>

then run commands on it to install your software

docker run <your/image> <your command and args>

then find your container ID by running

docker images

and commit you changes

docker commit <container_id> <some_name>

I'd recommend the docker tutorial to get started.

P.S. this answer will show you how to transfer files to docker.

Community
  • 1
  • 1
Jim Jeffries
  • 9,841
  • 15
  • 62
  • 103