docker-machine – connection refused error

I’m using docker-machine, docker-compose on mac OS to start up my container.

In my docker-compose.yml, i have

  • Why the pods returns Error or ExitCode:0 even they run successfully?
  • Error when creating container with golang docker engine
  • Error when running jekyll docker container with boot2docker on Mac
  • Apache in Docker won't deliver sites
  • Unable to ssh to master node in mesos local cluster installed system
  • How to handle IP addresses when linking docker containers with each other using docker-compose?
  • ports:
        - "8080:8080"
        - "3000"
        - "8000"
        - "8080"

    Steps to create docker-machine

    • docker-machine create testdocker –driver=virtualbox
    • eval “$(docker-machine env testdocker)”
    • docker-compose up -d (all containers start up properly)

      • docker-machine ip localdocker
      • open
      • echo ${DOCKER_HOST_IP}
      • open http://${DOCKER_HOST_IP}:8080 (// doesn’t open – times out/connection refused)
      • curl
        Connection refused

    I logged into the docker container and on ‘telnet localhost 8080’, i get connection refused error again. What am i doing wrong? I’m stumped.

  • nginx 403 Forbidden error
  • What's eth0 used for in docker host machine
  • How do I know whether “init” or “systemd” controls the docker?
  • Error :Could not connect to Redis at redis:6379: Name or service not known
  • Not able to view my simple flask app using uwsgi and Docker
  • Ubuntu Docker image broken out of the box?
  • One Solution collect form web for “docker-machine – connection refused error”

    Try just ping without port number. You can’t ping with port number. Check this answer.

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