Created
October 22, 2024 14:20
-
-
Save weidmaster/e9f9411e59604690c6cef1e2566c9df3 to your computer and use it in GitHub Desktop.
Dockerfile for PHP 5 with GD and mysqli support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:5.4.39-apache | |
RUN mkdir -p "$PHP_INI_DIR/conf.d" | |
RUN echo "deb http://archive.debian.org/debian/ jessie main" > /etc/apt/sources.list \ | |
&& echo "deb http://archive.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list | |
RUN apt-get update -y && apt-get install -y --allow-unauthenticated zlib1g-dev libjpeg62-turbo libpng-dev libjpeg-dev | |
RUN docker-php-ext-install mysqli pdo_mysql \ | |
&& docker-php-ext-configure gd \ | |
--with-png-dir=/usr/lib/ \ | |
--with-jpeg-dir=/usr/lib/ \ | |
--with-gd \ | |
&& docker-php-ext-install gd | |
RUN mkdir /var/lock/apache2 && mkdir /var/run/apache2 | |
RUN a2enmod rewrite | |
WORKDIR /var/www/html | |
COPY . . | |
COPY "php.ini-development" "$PHP_INI_DIR/php.ini" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment