how to use docker bridge network on google cloud p

2019-07-26 03:55发布

问题:

This question is an exact duplicate of:

  • can't open jupyter on google cloud platform with gpu and docker 1 answer

I can't use the following ways to open website with hostip:8000:

docker network create -d bridge mybridge 

docker run -d --net mybridge --name db redis 
docker run -d --net mybridge -e DB=db -p 8000:5000 --name web chrch/web

I have build gpu VM instance without docker images and install docker by myself

how to solve this problem?

回答1:

These steps should solve your problem

  • Check with docker ps that your containers are running

  • Check if firewall in GCP console. If port 8000 is open ( if no open for your ip )

  • Check GCP console your VM's Public IP and try with that