Sign inSign up

liyiberkeley/php7.4-apache

By liyiberkeley

Updated over 4 years ago

A basic php7.4 apache docker image with a few php extensions such as mysqli, memcache

Image
0

381

liyiberkeley/php7.4-apache repository overview

# Start from PHP official package
FROM php:7.4-apache
# Docker install php extenstions
# See https://github.com/mlocati/docker-php-extension-installer
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
# Install required php extenstions 
RUN install-php-extensions mysqli pgsql redis memcache opcache 

# Production configuration
# RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# COPY html/ /var/www/html/
# RUN chown -R www-data:www-data /var/www/html

# Development
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"

RUN sed -i 's/display_errors = Off/display_errors = On/g' "$PHP_INI_DIR/php.ini"
RUN sed -i 's/memory_limit = 128M/memory_limit = 512M/g' "$PHP_INI_DIR/php.ini"
RUN sed -i 's/;date.timezone =/date.timezone = America\/Los_Angeles/g' "$PHP_INI_DIR/php.ini"

Tag summary

Content type

Image

Digest

Size

157 MB

Last updated

over 4 years ago

docker pull liyiberkeley/php7.4-apache