Nginx / PHP-FPM image with some packages for development environments. Do not use it for production.
255
A Docker Nginx / PHP-FPM image with some useful packages for development environments. Do not use it for production.
Nginx, php5, Xdebug, composer, phpunit, phing
Nginx serve a phpinfo() page. To test it and obtain information about the configuration:
docker run -d -p 80:80 -p 443:443 alexisno/nginx-php-dev
docker run ... alexisno/nginx-php-dev Run Nginx and PHP-FPM in a new container-d Detached mode: run container in the background-p 80:80 -p 443:443 Publish the container's ports 80 and 443 on the host so you can connect to the serverOpen your brower at http://localhost/ and https://localhost/
Composer, phpunit and phing are available globally.
PHP is configured to send mail via a alexisno/mailcatcher-dev container.
Launch a alexisno/mailcatcher-dev container and use --link mailcatcher:my-mailcatcher-container.
Xdebug is configurated to accept any connection. Just send the appropriate request parameters.
This image should be used as a basic image for any project.
docker build or docker-compose build.Run your new image with a command similar to this:
docker run -d -p 80:80 -p 443:443 -v /path/to/your/project/sources:/var/www/project-name -v /path/to/project/data/apache/logs:/var/log/apache2 your-image-tag
The image comes with a gencert command to generate self signed certificates.
Usage in child Dockerfile:
RUN gencert <domain>
VirtualHost configuration:
server { listen 80; listen 443 ssl;
ssl_certificate /etc/ssl/certs/<domain>.crt;
ssl_certificate_key /etc/ssl/private/<domain>.key;
server_name <domain>;
# Complete with your configuration
# ...
}
Replace <domain> with the hostname you use for the development environment.
Content type
Image
Digest
sha256:44b1b7b8a…
Size
194.6 MB
Last updated
almost 11 years ago
docker pull alexisno/nginx-php-dev