Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in DevOps and Agile by (2.3k points)
Hey there, how so I start tomcat in docker container

1 Answer

0 votes
by (6.9k points)

You will have to first pull the tomcat image using the below command:

$ sudo docker pull tomcat

Then you can run the tomcat as a container using this command:

$ sudo docker run -it -p 8888:8080 --name mytomcatcon tomcat

Now you can start working with tomcat, go into the tomcat container using this command:

$ sudo docker exec -it mytomcatcon bash

Hope that helped :)


Join docker training course if you are interested in becoming a docker master.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...