docker搭建php

FROM php:7.3
MAINTAINER deng "[email protected]"

RUN docker-php-ext-install -j$(nproc) bcmath calendar exif gettext \
sockets dba mysqli pcntl pdo_mysql shmop sysvmsg sysvsem sysvshm

RUN apt-get update && \
apt-get install -y --no-install-recommends libicu-dev && \
rm -r /var/lib/apt/lists/* && \
docker-php-ext-install -j$(nproc) intl

RUN apt-get update && \
apt-get install -y --no-install-recommends libxml2-dev libtidy-dev libxslt1-dev && \
rm -r /var/lib/apt/lists/* && \
docker-php-ext-install -j$(nproc) soap wddx xmlrpc tidy xsl 

RUN apt-get update && \
apt-get install -y --no-install-recommends libbz2-dev && \
rm -r /var/lib/apt/lists/* && \
docker-php-ext-install -j$(nproc) bz2

RUN apt-get update && \
apt-get install -y --no-install-recommends libfreetype6-dev libjpeg62-turbo-dev libpng-dev && \
rm -r /var/lib/apt/lists/* && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install -j$(nproc) gd

RUN apt-get update && \
apt-get install -y --no-install-recommends libzip-dev && \
rm -r /var/lib/apt/lists/* && \
docker-php-ext-install -j$(nproc) zip

RUN cd /root/ && \  
curl -fsSL  http://pecl.php.net/get/redis-5.1.1.tgz -o redis-5.1.1.tgz && \
tar -xf redis-5.1.1.tgz && \
cd redis-5.1.1 && \
phpize && \
./configure && \
make -j$(nproc) && \
make install && \
docker-php-ext-enable redis && \
rm -r /root/*

RUN apt-get update && \
apt-get install -y --no-install-recommends zlib1g-dev libmemcached-dev && \
rm -r /var/lib/apt/lists/* && \
cd /root/ && \
curl -fsSL  http://pecl.php.net/get/memcached-3.1.4.tgz -o memcached-3.1.4.tgz && \
tar -xf memcached-3.1.4.tgz && \
cd memcached-3.1.4 && \
phpize && \
./configure && \
make -j$(nproc) && \
make install && \
docker-php-ext-enable memcached && \
rm -r /root/*

RUN apt-get update && \
apt-get install -y --no-install-recommends librabbitmq-dev && \
rm -r /var/lib/apt/lists/*  && \
cd /root/ && \
curl -fsSL  http://pecl.php.net/get/amqp-1.9.4.tgz -o amqp-1.9.4.tgz && \
tar -xf amqp-1.9.4.tgz && \
cd amqp-1.9.4 && \
phpize && \
./configure && \
make -j$(nproc) && \
make install && \
docker-php-ext-enable amqp && \
rm -r /root/*

RUN apt-get update && \
apt install -y --no-install-recommends librdkafka-dev && \
rm -r /var/lib/apt/lists/*  && \
cd /root/ && \
curl -fsSL  http://pecl.php.net/get/rdkafka-4.0.0.tgz -o rdkafka-4.0.0.tgz && \
tar -xf rdkafka-4.0.0.tgz && \
cd rdkafka-4.0.0 && \
phpize && \
./configure && \
make -j$(nproc) && \
make install && \
docker-php-ext-enable rdkafka && \
rm -r /root/*

RUN apt-get update && \
apt-get install -y --no-install-recommends libssl-dev && \
rm -r /var/lib/apt/lists/*  && \
cd /root/ && \
curl -fsSL  http://pecl.php.net/get/swoole-4.4.12.tgz -o swoole-4.4.12.tgz && \
tar -xf swoole-4.4.12.tgz && \
cd swoole-4.4.12 && \
phpize && \
./configure --enable-openssl && \
make -j$(nproc) && \
make install && \
docker-php-ext-enable swoole && \
rm -r /root/*

RUN apt-get update && \
apt-get install -y --no-install-recommends git && \
rm -r /var/lib/apt/lists/*  && \
cd /root/ && \
git clone https://github.com/swoole/ext-async.git && \
cd ext-async && \
git checkout v4.4.10 && \
phpize && \
./configure && \
make -j$(nproc) && \
make install && \
docker-php-ext-enable swoole_async && \
rm -r /root/*

RUN apt-get update && apt-get -y install libmosquitto-dev && \
pecl install mosquitto-0.4.0 && \
docker-php-ext-enable mosquitto



RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer && \
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

RUN apt-get update && apt-get install -y procps net-tools vim wget iputils-ping

你可能感兴趣的:(docker搭建php)