Last active
March 1, 2019 17:50
-
-
Save krisanalfa/4d19ef3e825f1def398f71446bca83c5 to your computer and use it in GitHub Desktop.
Docker with PHP 5.6 for common Laravel < 5.3 Application
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.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