Reputation: 2649
I have a docker container running in Windows, as per the below.
C:\magento2-devbox>docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
magento2devbox_db_046616a8b9fbb28b8fe4b01a66076f5e docker-entrypoint.sh mysqld Up 0.0.0.0:32776->3306/tcp
magento2devbox_elastic_046616a8b9fbb28b8fe4b01a66076f5e /docker-entrypoint.sh elas ... Up 0.0.0.0:32771->9200/tcp, 9300/tcp
magento2devbox_rabbit_046616a8b9fbb28b8fe4b01a66076f5e docker-entrypoint.sh rabbi ... Up 15671/tcp, 0.0.0.0:32773->15672/tcp, 25672/tcp, 4369/tcp, 5671/tcp, 0.0.0.0:32774->5672/tcp
magento2devbox_redis_046616a8b9fbb28b8fe4b01a66076f5e docker-entrypoint.sh redis ... Up 6379/tcp
magento2devbox_varnish_046616a8b9fbb28b8fe4b01a66076f5e /usr/local/bin/entrypoint.sh Up 0.0.0.0:32775->6081/tcp
magento2devbox_web_046616a8b9fbb28b8fe4b01a66076f5e /usr/local/bin/entrypoint.sh Up 0.0.0.0:32770->22/tcp, 44100/tcp, 0.0.0.0:32768->5000/tcp, 0.0.0.0:32769->80/tcp, 9000/tcp
However, when i try to reach to http://localhost:32769 which should map to the container web-server I get "connection refused". How can I start debugging what's happening?
Thanks.
Upvotes: 0
Views: 1257
Reputation: 2649
I've found the solution. In Windows the container doesn't run on Windows per se, but inside the tocket VM in Virtualbox. Thus you have to run:
C:\magento2-devbox>docker-machine ip
192.168.99.100
And then use that IP to reach the application: http://192.168.99.100:32769 - now it works. In my specific case above, I needed to reach the Varnish IP of the application http://192.168.99.100:32775
Upvotes: 1