I can not access my Container Docker Image by HTTP

I created an image with apache2 running locally on a docker container via Dockerfile exposing port 80. Then pushed to my DockerHUB repository

I created a new instance of Container Engine In my project on the Google Cloud. Within this I have two clusters, the Master and the Node1.
Then created a Pod specifying the name of my image in DockerHUB and configuring Ports “containerPort” and “hostPort” for 6379 and 80 respectively.

  • zsh function to set docker environment on OSX
  • ehcache not working in Tomcat Docker image
  • How can I configure logtash to use “stdout” as input?
  • Connecting a Docker container to a network interface / device instead of an IP address
  • run docker commands from command prompt versus jenkins script
  • Mapping user/group from host to docker container
  • Node1 accessed via SSH and the command line: $ sudo docker ps -l Then I found that my docker container there is.
    I created a service for instance by configuring the ports as in the Pod, “containerPort” and “hostPort” for 6379 and 80 respectively.
    I checked the Firewall is available with access to port 80. Even without deems it necessary, I created a rule to allow access through port 6379.

    But when I enter http://IP_ADDRESS:PORT is not available.
    Any idea about what it’s wrong?

  • Create Docker container with Nodev4.4.7 and Python3
  • Docker how to add volume to a running container?
  • Amazon EFS access denied while mounting in docker container
  • Window version of Docker not able to mount local directory to ubuntu image on container?
  • Error Deploying Docker Container to Elastic Beanstalk
  • Bundle optimization for ruby on Docker
  • One Solution collect form web for “I can not access my Container Docker Image by HTTP”

    If you are using a service to access your pod, you should configure the service to use an external load balancer (similarly to what is done in the guestbook example’s frontend service definition) and you should not need to specify a host port in your pod definition.

    Once you have an external load balancer created, then you should open a firewall rule to allow external access to the load balancer which will allow packets to reach the service (and pods backing it) running in your cluster.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.