Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulo-correia/docker_apache_vhosts
Apache VHOSTS on Docker
https://github.com/paulo-correia/docker_apache_vhosts
alpine apache docker dockerfile vhosts
Last synced: 9 days ago
JSON representation
Apache VHOSTS on Docker
- Host: GitHub
- URL: https://github.com/paulo-correia/docker_apache_vhosts
- Owner: paulo-correia
- Created: 2020-05-05T22:10:34.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-05T22:12:54.000Z (over 4 years ago)
- Last Synced: 2024-11-21T06:37:54.527Z (2 months ago)
- Topics: alpine, apache, docker, dockerfile, vhosts
- Language: Dockerfile
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Apache VHOSTS on Docker (Alpine Linux Image)
## Save Dockerfile on a folder Ex: Apache
**Caution: Only one dockerfile per folder**### Generate image
docker build -t `` .
`` = Ex: apache or your_docker_hub_name/apache:1.0
### Running Container
docker run -d -p ``:80 ``
`` = Ex 8080
### If don't generate image, get from docker hub
docker run -d -p ``:80 paulocorreia/alpine_apache_vhosts:1.0
### GET Current IP from your running Container
docker container exec -it `` /bin/sh
`` you get on docker ps
inside your container type ifconfig and get inet addr on eth0 - Ex 172.17.0.2
### Change your hosts file
If your OS is Linux:Edit as root your /etc/hosts and add a line ate end of file
on `` put your container IP - Ex 172.17.0.2`` sample.dck
`` other.dckAnd save
Or is Windows:
Edit C:\Windows\System32\drivers\etc\hosts and add a line ate end of file
on `` put your container IP - Ex 172.17.0.2`` sample.dck
`` other.dckAnd save
### Open Browser
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