docker/fig: port forwarding to guest machine does not work on MacOS

I am trying to get this fig image here up and running:

docker and fig installed fine and also the two images boot normally (including the applications – checked from the logs).
however, there should be a port forwarding setup so that I can connect from my host machine to the sonarqube instance. however, I can’t connect to the machines as no port is open on the host OS.

  • Kubernetes and flannel network setup
  • docker machine (virtualbox vm) export container port to host machine fail
  • Configure PM2 module with linked docker container
  • Why is nginx returning a 502 when doing a `uwsgi_pass` to a linked docker container?
  • Understanding Docker Macvlan network
  • Boot2Docker on Mac - Returns bsdthread_register error
  • Is there anybody who can give me a hint on what I’m doing wrong?


    $ docker port dockersonarqube_sonarqube_1
    443/tcp ->
    9000/tcp ->
    $ curl
    curl: (7) Failed connect to; Connection refused

    this is the fig config file:

      image: orchardup/postgresql:latest
        - POSTGRESQL_USER=sonar
        - POSTGRESQL_PASS=xaexohquaetiesoo
        - POSTGRESQL_DB=sonar
        - /opt/db/sonarqube/:/var/lib/postgresql
      image: harbur/sonarqube:latest
        - postgresql:db
        - DB_USER=sonar
        - DB_PASS=xaexohquaetiesoo
        - DB_NAME=sonar
        - ""
        - "443"

  • Kubernetes multi-tier container application
  • Kubernetes Kube-Proxy Server: Can it run without iptables' nat module?
  • How can I ensure graceful scaling in kubernetes?
  • docker containers static IP to communicate two different hosts
  • Can I run Docker in a Virtual Machine?
  • RestTemplate exchange call gives 503 error when running in Docker container at Kubernetes environment
  • 2 Solutions collect form web for “docker/fig: port forwarding to guest machine does not work on MacOS”

    If you’re using boot2docker on a Mac, you need to access the website via the VM. You’ll need to do two things:

    • Expose the VM port on all interfaces by changing "" to "".
    • Use the IP of the VM to connect to the server e.g. curl $(boot2docker ip 2> /dev/null):9000

    You shouldn’t need to muck with port forwarding inside the VM unless you really don’t like using the boot2docker IP rather than

    With boot2docker on OSX you need to set up port forwarding. You need to run something like:

    VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port9000,tcp,,9000,,9000";


    Also you need to replace by in your fig.yml file in order to have

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