Skip to content

Commit 4a11204

Browse files
committed
update php fpm
install open ssl for system upgrade php zip
1 parent 6a4bbee commit 4a11204

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

Dockerfiles/php-fpm/Dockerfile

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ RUN set -xe; \
1212
apt-utils \
1313
unzip \
1414
curl \
15+
libzip-dev \
16+
zip \
1517
libmemcached-dev \
1618
zlib1g-dev \
1719
libz-dev \
@@ -35,16 +37,34 @@ RUN set -xe; \
3537
docker-php-ext-install opcache && \
3638
docker-php-ext-enable opcache && \
3739
docker-php-ext-enable redis && \
38-
docker-php-ext-enable xdebug
40+
docker-php-ext-enable xdebug && \
41+
docker-php-ext-configure zip --with-libzip && \
42+
docker-php-ext-install zip
3943

4044

41-
# install zip extensions
42-
# ps. next lines are here becase there is no auto build on docker
43-
RUN apt-get install -y --no-install-recommends \
44-
libzip-dev \
45-
zip \
46-
&& docker-php-ext-configure zip --with-libzip \
47-
&& docker-php-ext-install zip
45+
# install, upgrade openssl
46+
RUN apt-get update -yqq \
47+
&& apt-get install -y --no-install-recommends openssl \
48+
&& sed -i 's,^\(MinProtocol[ ]*=\).*,\1'TLSv1.0',g' /etc/ssl/openssl.cnf \
49+
&& sed -i 's,^\(CipherString[ ]*=\).*,\1'DEFAULT@SECLEVEL=1',g' /etc/ssl/openssl.cnf\
50+
&& rm -rf /var/lib/apt/lists/*
51+
52+
53+
54+
# Install needed php extensions: memcache
55+
RUN curl -fsSL 'https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip' -o memcache.zip \
56+
&& unzip memcache.zip \
57+
&& rm memcache.zip \
58+
&& ( \
59+
cd pecl-memcache-NON_BLOCKING_IO_php7 \
60+
&& phpize \
61+
&& ./configure --enable-memcache \
62+
&& make \
63+
&& make install \
64+
) \
65+
&& rm -r pecl-memcache-NON_BLOCKING_IO_php7 \
66+
&& docker-php-ext-enable memcache
67+
4868

4969

5070
COPY ./pool.conf /usr/local/etc/php-fpm.d/pool.conf

0 commit comments

Comments
 (0)