Last active
June 6, 2017 08:56
-
-
Save andrewmclagan/ef8ffead832d39c8e55c7257321da90e to your computer and use it in GitHub Desktop.
Install PHP-FPM, Extensions, Nginx and supervisor in Alpine linux
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
# | |
#-------------------------------------------------------------------------- | |
# Install | |
#-------------------------------------------------------------------------- | |
# | |
RUN apk --no-cache add \ | |
libmcrypt-dev \ | |
freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev \ | |
wget \ | |
git \ | |
nginx \ | |
ca-certificates \ | |
supervisor \ | |
bash \ | |
&& docker-php-ext-install \ | |
mcrypt \ | |
mbstring \ | |
mysqli \ | |
pdo_mysql \ | |
opcache \ | |
&& docker-php-ext-configure gd \ | |
--with-gd \ | |
--with-freetype-dir=/usr/include/ \ | |
--with-png-dir=/usr/include/ \ | |
--with-jpeg-dir=/usr/include/ \ | |
&& NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \ | |
&& docker-php-ext-install -j${NPROC} gd \ | |
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | |
&& ln -sf /dev/stderr /var/log/nginx/error.log \ | |
&& chown -R www-data:www-data /var/lib/nginx \ | |
&& chown -R www-data:www-data /var/www \ | |
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \ | |
&& composer global require "hirak/prestissimo:^0.3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment