Docker Community Forums

Share and learn in the Docker community.

Map static IP of a google cloud vm instance to docker container IP


(Sureshkumara25) #1

Hello Everyone,

I have created ubuntu vm in google cloud with static IP A.B.C.D. I want to host drupal site (PHP CMS) in a docker. map static IP of a google cloud vm instance A.B.C.D to site hosted in docker.

I have followed https://circleci.com/blog/continuous-drupal-p1-maintaining-with-docker-git-composer/ to setup drupal site in docker.

basically using docker-compose I have created containers for mariadb and Drupal:latest and installed the site.

I want my ubuntu vm to be clean, I haven’t installed any apache/nginx server in host machine.

I want to map static IP of a google cloud vm instance to docker container IP so that In browser If I access http://A.B.C.D my site should load.

Do I need to fix this in host machine, google cloud vm setting or else in docker containers is what I am getting confused.

Thank you for the answer.