I am running Docker on Windows (not the native version. i.e. the one that runs on a VM via docker-machine
).
Currently I have the access websites like so:
192.168.99.100:8080 for website 1
192.168.99.100:8081 for website 2
192.168.99.100:8082 for website 3
This is a real pain for obvious reasons.
I want to be able to do it how I used to do it with Apache Virtual Hosts, where I modify the hosts
file and can then instead just type something like: website1.dev
.
How can I do this for Docker containers?
My first solution was simply append the following to the hosts files on my Windows machine like so:
192.168.99.100 docker.dev
However docker.dev
will only forward to 192.168.99.100:80
(i.e. website 1), due to the fact you can't place ports on the hosts file.