Apache VHOSTS on Alpine Linux
85
docker run -d -p <local port>:80 paulocorreia/alpine_apache_vhosts:1.0
<local port> = Ex 8080
docker container exec -it <container name or id> /bin/sh
<container name or id> you get on docker ps
inside your container type ifconfig and get inet addr on eth0 - Ex 172.17.0.2
If your OS is Linux:
Edit as root your /etc/hosts and add a line ate end of file
on <container IP> put your container IP - Ex 172.17.0.2
<container IP> sample.dck
<container IP> other.dck
And save
Or is Windows:
Edit C:\Windows\System32\drivers\etc\hosts and add a line ate end of file
on <container IP> put your container IP - Ex 172.17.0.2
<container IP> sample.dck
<container IP> other.dck
And save
Open http://sample.dck if you see SAMPLE - VHOSTS on Docker is OK
Open http://other.dck/ if you see OTHER - VHOSTS on Docker is OK
Content type
Image
Digest
Size
5.1 MB
Last updated
over 6 years ago
docker pull paulocorreia/alpine_apache_vhosts:1.0