Requests hanging on ports forwarded from docker container inside vagrant

Viewed 1039

So I have a setup very similar to this one where I have a docker container running a web service inside of vagrant.

When trying to make a request to the web service on the forwarded port in the docker container from inside vagrant, everything works fine, but when trying to make the request from outside, on my local box, the request just hangs forever. Also- it only hangs if the docker container is running, if it is not then the request just fails immediately as normal.

I am forwarding the vagrant ports via:

config.vm.network :forwarded_port, guest: 3000, host: 3000

and the docker ports via:

docker run -p 3000:3000

Any ideas?

1 Answers
Related