Sign inSign up

r0mdau/apache2-php

By r0mdau

Updated about 10 years ago

Image running apache2 with php, installation via Apt

Image
1

1.0K

r0mdau/apache2-php repository overview

Introduction

Dockerfile to build apache2 with PHP using Apt

Installation

Pull the latest version of the image from the docker index. This is the recommended method of installation as it is easier to update image in the future. These builds are performed by the Docker Trusted Build service.

docker pull r0mdau/apache2-php:latest

Build

git clone https://github.com/r0mdau/docker-images.git
cd docker-images/apache2-php/
docker build -t r0mdau/apache2-php .

Run

docker run --name apache2-php -p 80:80 -v /pathToProject:/var/www/html:rw -v /pathToVhost:/etc/apache2/sites-enabled:ro -d r0mdau/apache2-php:latest

Path to vhost is not mandatory.

To customize

Dockerfile example :

FROM r0mdau/apache2-php:latest
RUN apt-get update
RUN apt-get install -y YOURPACKAGE
CMD ["apache2ctl",  "-D", "FOREGROUND"]

Tag summary

Content type

Image

Digest

sha256:d0366bb26

Size

115.3 MB

Last updated

about 10 years ago

docker pull r0mdau/apache2-php