β

php 7.1.12 Dockerfile

快乐生活,快乐工作 61 阅读

FROM php:7.1-fpm

# Composer
COPY config/composer /usr/local/bin/composer
RUN chmod 755 /usr/local/bin/composer

# Install selected extensions and other stuff
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
build-essential lsb-release \
libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev libssl-dev librabbitmq-dev \
&& apt-get -y --no-install-recommends install apt-utils \
&& apt-get -y install wget procps iputils-ping net-tools vim telnet \
&& apt-get autoremove -y; apt-get autoclean -y; apt-get clean -y; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

RUN rm -rf /usr/local/etc/php-fpm.d/*

RUN pecl install igbinary redis xdebug swoole amqp \
&& echo "extension=igbinary.so" > /usr/local/etc/php/conf.d/igbinary.ini \
&& echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini \
&& echo "zend_extension=xdebug.so" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "extension=swoole.so" > /usr/local/etc/php/conf.d/swoole.ini \
&& echo "extension=amqp.so" > /usr/local/etc/php/conf.d/amqp.ini

RUN docker-php-source extract && cp /usr/src/php/ext/openssl/config0.m4 /usr/src/php/ext/openssl/config.m4 && docker-php-ext-install -j$(nproc) openssl && rm -rf /usr/src/php

RUN docker-php-ext-install -j$(nproc) iconv mcrypt pdo_mysql mysqli exif gettext
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd

# Install tideways
RUN echo 'deb http://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages debian main' > /etc/apt/sources.list.d/tideways.list \
&& wget -qO - https://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages/EEB5E8F4.gpg | apt-key add - \
&& apt-get update \
&& apt-get install tideways-php tideways-daemon \
&& echo "extension=tideways.so" > /usr/local/etc/php/conf.d/tideways.ini \
&& apt-get autoremove -y; apt-get autoclean -y; apt-get clean -y; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

# Install phalcon
RUN curl -sSL "https://codeload.github.com/phalcon/cphalcon/tar.gz/v3.2.4" | tar -xz \
&& cd cphalcon-3.2.4/build && ./install \
&& cd ../../ && rm -rf cphalcon-3.2.4 \
&& echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/phalcon.ini

作者:快乐生活,快乐工作
快乐每一天
原文地址:php 7.1.12 Dockerfile, 感谢原作者分享。

发表评论