How do I get a tomcat conatiner up and running on GCP

0 votes

So I have the server… following the instructions on google cloud platform

I have the docker images downloaded thereon server and running with following properties:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

60b206130ef1 tomcat:7 “catalina.sh run” 6 hours ago Up 6 hours 0.0.0.0:32768->8080/tcp hopeful_hoover


I have my external IP-adress for my docker-server (I assume this would also be my docker host as far as I understand)
That server has a firewall that allows http and https traffic…

So what else do i want to try and do to see the homepage of tomcat besides typing my external server ip-adress:32768 in my native browser ?

Oct 22, 2019 in GCP by Karan
• 19,610 points
1,901 views

1 answer to this question.

0 votes

You are running that container on port 32768. You will probably want to specify what port to map that to rather than allowing docker to choose one for you.

Instead of doing docker run -P or docker run -p 8080, you can specify the port like this: docker run -p 80:8080. That will bind your tomcat’s 8080 to your docker host’s port 80. Your firewall should allow that connection to happen.

Try this:

sudo docker run -d -p 80:8080 tomcat:8.0

answered Oct 22, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
1 answer

How do i delete a RAM disk from my instance on GCP?

You can unmount a tmpfs RAM disk just like ...READ MORE

answered Oct 22, 2019 in GCP by Sirajul
• 59,230 points
1,025 views
0 votes
1 answer
0 votes
1 answer

How do I transfer files to a windows instance on GCP?

You could probably use Windows RDP client for ...READ MORE

answered Nov 8, 2019 in GCP by Sirajul
• 59,230 points
2,845 views
0 votes
1 answer
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,714 views
0 votes
1 answer

How do I create a Virtual Machine on GCP?

To create a VM instance: It is important you ...READ MORE

answered Sep 20, 2019 in GCP by Sirajul
• 59,230 points
1,266 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP