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 in GCP by Karan
• 6,670 points
39 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 by Sirajul
• 41,000 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 in GCP by Sirajul
• 41,000 points
33 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 in GCP by Sirajul
• 41,000 points
46 views
0 votes
1 answer

How do I create a Google Cloud Platform (GCP) account?

In order to access the services provided ...READ MORE

answered Sep 20 in GCP by Sirajul
• 41,000 points
89 views
0 votes
1 answer
0 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
• 57,300 points
270 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 in GCP by Sirajul
• 41,000 points
58 views