Requests to docker containers failing on chrome for OSX

I have several docker containers running on OSX using Docker for Mac and I’ve set up port mapping in the docker-compose file in order to access them on localhost. This usually works, but sometimes the requests fail when accessing them from the Chrome browser.

In this event I see nothing in the docker-compose output suggesting that the container has received a request, and the tab just hangs for however long I leave it. The only thing that helps is waiting a few moments and then opening another url (or even the same localhost url) in a different Chrome tab, this sometimes causes the request to localhost to go through.

  • how can I create a data-container only using docker-compose.yml?
  • Docker on embedded systems, why not?
  • Running services (upstart/init.d) in a container
  • Docker: unable to find user root: no matching entries in passwd file
  • Install Docker auto completion without using Home Brew
  • Docker For Windows - Java app deployed on a container gets a connection refused error when calling another java app deployed on another container
  • I’m having no problem with other browsers (Firefox, Safari) and the same containers can be accessed reliably with Chrome on Ubuntu.

    Versions:

    • OSX: 10.12.4
    • Docker: 17.03.1-ce-mac12
    • Chrome: 58.0.3029.110

  • Unsatisfiable constraints when installing packages on docker alpine
  • What is docker image location on Windows 10
  • Different result using docker-compose vs docker run
  • How to build a Docker container for JAVA web application
  • Docker logs interpreting JSON logs as string
  • ping github.organization.com returns unknown host
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.