Skip to content

Instantly share code, notes, and snippets.

@krisanalfa
Last active March 1, 2019 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisanalfa/4d19ef3e825f1def398f71446bca83c5 to your computer and use it in GitHub Desktop.
Save krisanalfa/4d19ef3e825f1def398f71446bca83c5 to your computer and use it in GitHub Desktop.
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