Docker Community Forums

Share and learn in the Docker community.

Behat & Accessing Virtualbox VM from Docker Container

(Circlical) #1


I’ve got a VirtualBox VM that uses NAT networking, with a port forward entry that looks like this:

Host IP:, 
Host Port: 55555
Guest IP:
Guest Port: 80

I’d like to run some Behat tests on that web app, and am trying to use the selenium/standalone-chrome docker to get this done:

docker run -d -p 4444:4444 selenium/standalone-chrome:3.4.0-einsteinium

With the VM and Docker running, I try to execute my behat tests that are configured like so:

  autoload: [ %paths.base%/../contexts ]
      paths: [ %paths.base%/../features ]
      contexts: [ FeatureContext ]
      javascript_session: selenium2
      browser_name: chrome
      goutte: ~
      selenium2: ~

Yet it seems that while I am able to access port 55555 from my browser, the Docker cannot. How can I get the Docker to access that port? Right now, it errors out with this message:

This site can’t be reached refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED Reload DETAILS

I imagine it’s rooted in how is the docker container itself, but I am not certain how to ‘get out’ properly.

Thanks for your help, admittedly new to Docker.