Sign inSign up

mybbsky/ngnix-php7427

By mybbsky

•Updated about 4 years ago

ngnix1.22+php7.4

Image
0

195

mybbsky/ngnix-php7427 repository overview

⁠Update Nginx to 1.22

⁠Add PHP Prober Files : phpinfo.php
⁠Change Debain sources to Aliyun

⁠Nginx, php-fpm and runit base image

⁠Description

Out of the box, this image offers a working nginx and php-fpm webserver. This image is intended to allow to run a PHP application either passing a PHP application folder webroot as argument, either writing a Dockerfile with mybbsky/ngnix-php7427 image as base image.

Your web directory — if you don't add vhosts — is /var/wwwroot/default (mounted as volume).

The PHP last 7 version is compiled through a build process borrowed from the official PHP Docker image, with this Dockerfile used.

We add common extensions like calendar, curl, gd, iconv, libxml, mbstring, mysqli, PDO MySQL and pcntl. The Pear, PECL executables and utilities (including build stuff like phpize) are available too.

Once running, you can quickly add PHP extensions to this image, with docker-php-ext-configure and docker-php-ext-install scripts.

Nginx is installed through the nginx-full Debian package. SSL is ready if needed at the container level (we expose ports 80 and 443).

Services are managed by runit in /var/service directory.

How to use it

To rebuild this image:

⁠docker build --tag mybbsky/ngnix-php7427 .

To rebuild a fork of this image based on a modified Dockerfile:

⁠docker build --tag your-image-name-tag .

To launch a container to execute a PHP application in /opt/wwwroot with http://localhost:8080⁠ as address:

⁠docker run -d --name webserver --restart=unless-stopped -v /opt/wwwroot:/var/wwwroot/default -p 8080:80 mybbsky/ngnix-php7427

To create an image for an application with this as base, create a Dockerfile:

FROM mybbsky/ngnix-php7427

⁠Debian commands to deploy your application code

⁠If you need other processes, add a /var/service//run file

That's it.

Tag summary

Content type

Image

Digest

sha256:065fd56b6…

Size

274.7 MB

Last updated

about 4 years ago

docker pull mybbsky/ngnix-php7427