🐳 Apache docker image based on Alpine Linux
1.0K
Apache web server image to run your PHP project.
Image is built on Debian Wheezy.
Available software packages installed are:
Apache listens on ports:
Those can be remapped when running the container.
A controlpanel is available when running the container, providing links to access different tools such as :
Some virtual hosts are also burned into the image to provide easy access to your project with a dynamic DocumentRoot.
These virtual hosts will allow you to run eZ Publish (5 & Platform), Drupal or Symfony projects (DocumentRoot is /var/www/path_to_your_project_folder/web/).
You can override these virtual hosts by mounting your own virtual hosts (with the same file name) as volume when running the container.
The available virtual host files are listed here.
If you are working behind a corporate http proxy, run the klabs/forgetproxy container
Run the container
You can run the container with the docker run command :
docker run -p 80:80 -p 88:88 -p 82:82 -p 443:443 meg4r0m/debian-apache-php5.4:2.2
You can add new virtual hosts by adding it as volume in /etc/apache2/sites-available folder.
The new virtual hosts filename MUST START WITH '0' !
Ex :
docker run -p 80:80 -p 88:88 -p 82:82 -p 443:443 -v "005-myvhost.conf:/etc/apache2/sites-available/005-myvhost.conf" meg4r0m/debian-apache-php5.4:2.2
You can override php.ini settings provided in the image by mounting your own php.ini file in /etc/php5/apache2/conf.d/
Your php.ini filename must start with a number greater than 20 followed by '-' !
Ex :
docker run -p 80:80 -p 88:88 -p 82:82 -p 443:443 -v "21-my_custom_php_conf.ini:/etc/php5/apache2/conf.d/21-my_custom_php_conf.ini" meg4r0m/debian-apache-php5.4:2.2
You can run an additional script during container startup.
In order to do so, you have to mount your own startup script (must be executable) in /run/startup.sh
Ex :
docker run -p 80:80 -p 88:88 -p 82:82 -p 443:443 -v "startup.sh:/run/startup.sh" meg4r0m/debian-apache-php5.4:2.2
Content type
Image
Digest
Size
261.4 MB
Last updated
almost 8 years ago
docker pull meg4r0m/alpine-apache