Can't reach a local website through apache in a docker container (windows & docker toolbox) Can't reach a local website through apache in a docker container (windows & docker toolbox) apache apache

Can't reach a local website through apache in a docker container (windows & docker toolbox)


something you need to know is that when you run docker on windows its not actual running on your windows machine but the docker toolbox creates a virtual box VM in wich it runs docker. You can read more on this here https://docs.docker.com/engine/installation/windows/so you can check your website on the ip the virtual box VM has.To find out the ip address of the vm you can use the following command

docker-machine ip


Add this row on Dockerfile

RUN echo "ServerName www.example.com" >> /etc/apache2/apache2.conf