Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jjcosgrove/docker-apache-php
Automated Docker build for Apache2, PHP5 and Extensions
https://github.com/jjcosgrove/docker-apache-php
apache docker dockerfile
Last synced: about 2 months ago
JSON representation
Automated Docker build for Apache2, PHP5 and Extensions
- Host: GitHub
- URL: https://github.com/jjcosgrove/docker-apache-php
- Owner: jjcosgrove
- License: mit
- Created: 2016-01-07T17:51:54.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-07T18:19:56.000Z (about 9 years ago)
- Last Synced: 2023-03-01T06:05:25.422Z (almost 2 years ago)
- Topics: apache, docker, dockerfile
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Automated Docker build for Apache2, PHP5 and Extensions
* Based on/uses the official [Debian Docker image](https://hub.docker.com/_/debian/).
* Enabled extensions: curl, gd, mcrypt, mysql, redis and apcu.
* Includes vhosts.conf file for dynamic VirtualHosts*.
* Disables *000-default.conf*.\* Meaning you can create a new website by simply creating a new folder in the webroot. No re-configuration of Apache or .conf file needed.
## Configuring vhosts.conf
Be sure to replace 'YOUR_DOMAIN_NAME_GOES_HERE' with your actual domain name.
## Creating an Image
```bash
docker build -t apache-php:latest .
```## Creating a Container
```bash
docker run -d --name apache-php -p 0.0.0.0:1080:80 apache-php:latest
```Accessible via:
```
http://domain-or-docker-host-ip:1080
```Which should present you with the message:
```
APACHE with PHP on Docker is up and running...
```## Persistent Storage
```bash
docker run -d --name apache-php -p 0.0.0.0:1080:80 --volume /your/desired/local/webroot:/var/www apache-php:latest
```## Persistent Storage & Linking (MySQL)
```bash
docker run -d --name apache-php -p 0.0.0.0:1080:80 --link mysql:mysql --volume /your/desired/local/webroot:/var/www apache-php:latest
```