how to use docker bridge network on google cloud p

2019-07-26 03:31发布

This question is an exact duplicate of:

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条回答
Explosion°爆炸
2楼-- · 2019-07-26 03:49

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

查看更多
登录 后发表回答