Skip to content

Instantly share code, notes, and snippets.

@krisanalfa
Last active Mar 1, 2019
Embed
What would you like to do?
Docker with PHP 5.6 for common Laravel < 5.3 Application
FROM php:5.6-apache
# Install dependencies
RUN apt-get update \
&& apt-get install git libmcrypt-dev libzip-dev libmagickwand-dev --yes
# Install PHP extensions
RUN docker-php-ext-install \
mysqli \
pdo \
pdo_mysql \
zip \
mcrypt \
intl \
&& docker-php-ext-configure gd \
--with-gd \
--with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Enable Apache module
RUN a2enmod rewrite headers
# Cleaning up everything
RUN apt-get remove --autoremove --purge --yes $PHPIZE_DEPS libmagickwand-dev \
&& apt-get install --no-install-recommends --no-install-suggests --yes libgd-dev libltdl7 \
&& apt-get clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment