Sign inSign up

meg4r0m/alpine-apache

By meg4r0m

Updated almost 8 years ago

🐳 Apache docker image based on Alpine Linux

Image
0

1.0K

meg4r0m/alpine-apache repository overview

Apache/php 5.6 web server

Apache web server image to run your PHP project.

Image is built on Debian Wheezy.

Available software packages installed are:

  • Apache 2.2
  • PHP 5.6
  • ImageMagick 6.7
  • JAVA (OpenJDK 7)
  • Curl
  • Nano

Apache config

Apache listens on ports:

  • 80 (dev vhost)
  • 82 (demo vhost)
  • 88 (controlpanel vhost)
  • 443 (SSL)

Those can be remapped when running the container.

A controlpanel is available when running the container, providing links to access different tools such as :

  • PHP Info
  • Memcached Info
  • Memcached Admin
  • Solr Admin GUI
  • PhpMyAdmin
  • Varnish agent

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.

How to 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

How to add a new Virtual Host

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

How to override php.ini settings

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

How to execute additional script at startup

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

Tag summary

Content type

Image

Digest

Size

261.4 MB

Last updated

almost 8 years ago

docker pull meg4r0m/alpine-apache