Sign inSign up

leroymerlinbr/php

By leroymerlinbr

•Updated over 3 years ago

PHP Docker Images used as base on our open-source projects

Image
3

8.6K

leroymerlinbr/php repository overview

⁠Leroy Merlin Brasil - Docker Images

⁠PHP

⁠How to use this image

Please refer to the official PHP image documentation.⁠

Our images contain mongodb, pcntl and zip extensions. Also git and composer are already installed.

Also, one big difference for the apache version is that the default container user is www-data. Apache is configured to run as www-data on port 80. By doing this, we ensure correct file permissions on shared folders between host and container.

To customize the image, if you neet root permissions, you must change your user to root. For example:

FROM leroymerlinbr/php:apache

USER root

RUN apt-get update -qq \
  && apt-get install -qq --no-install-recommends \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libpng-dev \
 && docker-php-ext-install -j$(nproc) iconv \
 && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
 && docker-php-ext-install -j$(nproc) gd

USER www-data

The other difference is that we already configured a env for DocumentRoot, so to change the default DocumentRoot in Apache (away from /var/www/html):

FROM leroymerlinbr/php:7.1-apache

ENV APACHE_DOCUMENT_ROOT /path/to/new/root

(The env can then be modified at container runtime as well.)

⁠License

View PHP license information⁠ for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

The PHP images are based on official PHP docker image⁠.

This repository is licensed under MIT⁠.

⁠Deprecation notice

THIS REPOSITORY AND IMAGES WILL BE DEPRECATED ON AUGUST 2021. THE TEAM WILL KEEP SUPPORTING PHP CUSTOM IMAGES IN DOCKER HUB BUT IN A PRIVATE REPOSITORY.

Tag summary

Content type

Image

Digest

Size

194.8 MB

Last updated

over 5 years ago

docker pull leroymerlinbr/php