DNS Swarm agent not working on Azure

1- I created a new containerservice in azure.

2 – The creation was done following the portal step by step.

  • Can I build a Docker image to “cache” a yocto/bitbake build?
  • How to get container id of a docker service
  • Automated builds for multiple containers
  • Linked docker containers can't communicate with each other
  • Can not resolve hostname in Docker 1.10
  • Adding nodes on the fly with Docker Swarm
  • 3 – I have not changed any configuration of any service, VM, balancing, master and agent.

    4 – I can connect with PuTTY normally.

    5 – I can open a tunnel by redirecting port 80 to port 80.

    Following this tutorial, I can put the container to run::

    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                NAMES
    ffe6a1c890e4        yeasy/simple-web    "/bin/sh -c 'pytho..."   31 minutes ago      Up 31 minutes>80/tcp   vibrant_morse

    If I access localhost from my browser I can reach port 80 of the container and see the identical “Real Visit Results” page of the tutorial.

    But in the tutorial it says that if I use load balancer’s DNS I should see the result, that’s my problem, I can not access the container through DNS, I only get timeout.

    Reinforcing, I created a container service and did not change any configuration, just entered with PuTTY and put the container to run.

  • Google Container Registry access denied when pushing docker container
  • Spawn a new process in docker container which image is built from scratch
  • For Docker, will apps stop working when host kernel is updated?
  • Unable to upgrade pip in docker build
  • Docker non mounting volume
  • Deploy docker container from external registry to Heroku
  • One Solution collect form web for “DNS Swarm agent not working on Azure”

    According to your description, it seems that you don’t set your DOCKER_HOST environment variable to the local port configured for the tunnel. When you ssh to your master VM, you need execute command below:

    export DOCKER_HOST=:2375

    Run the Docker commands that tunnel to the Docker Swarm cluster. For example:

    docker info

    If you don’t set the environment variable on the tunnel, the docker contanier is created on master VM, so you could not get the Web with agent Public IP.

    Also, you could not set environment variable, but you need to point to the host when you execute docker command. More information please refer to this link

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