Sign inSign up

monsieurbiz/php

By monsieurbiz

•Updated about 3 years ago

PHP images with more extensions and composer

Image
2

10K+

monsieurbiz/php repository overview

⁠Reference

Please refer to the official library on docker hub⁠.

⁠What difference?

We have added a lot of PHP extensions to make the images compatible with Magento (as example).

Composer is installed by default and these images will be rebuild each time a new version is available to keep composer up-to-date.

Blackfire probe is setup by default if you have the container blackfire⁠.

We also have added some tools: vim, ssmtp, zip, unzip, git and mysql (client).

⁠Work with correct rights on filesystem

You can use this snippet in your own Dockerfile:

# Use www-data with correct UID
ARG USER_UID=1000
RUN usermod -u $USER_UID www-data

Then you can override the USER_UID via docker-compose or directly via --build-arg when you build the image using docker.

⁠Use crontab

The cli versions don't have cron.

You can put all the crons you need into the /etc/crontab file.

Dockerfile examples:

COPY files/crontab /etc/cron.d/my-crontab

or

RUN echo "* * * * * www-data echo \$(date) > /tmp/foo" >> /etc/crontab

*Note: In the case you use your own file in /etc/cron.d/, don't forget to add the SHELL you want to use and the PATH you need,n the top of your cron file, like this:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SHELL=/bin/bash

If you want to suppress the mail sent by cron, you can add MAILTO= at the beginning of your own crontab.

⁠Maintainer

The whole team of Monsieur Biz⁠ maintains these images.

⁠Tests

These PHP images are built by Github Actions when a change is made into the php/ directory.

Tag summary

Content type

Image

Digest

sha256:e2b0835d0…

Size

220.1 MB

Last updated

about 3 years ago

docker pull monsieurbiz/php:8.0-cli