1- FROM behance/docker-nginx:8.5
2- MAINTAINER Bryan Latten <latten @adobe.com>
1+ FROM behance/docker-nginx:8.7
2+ LABEL maintainers="Behance Team <dev-behance @adobe.com>"
33
44# Set TERM to suppress warning messages.
5- ENV CONF_PHPFPM=/etc/php/5.6 /fpm/php-fpm.conf \
6- CONF_PHPMODS=/etc/php/5.6 /mods-available \
7- CONF_FPMPOOL=/etc/php/5.6 /fpm/pool.d/www.conf \
8- CONF_FPMOVERRIDES=/etc/php/5.6 /fpm/conf.d/overrides.user.ini \
5+ ENV CONF_PHPFPM=/etc/php/7.4 /fpm/php-fpm.conf \
6+ CONF_PHPMODS=/etc/php/7.4 /mods-available \
7+ CONF_FPMPOOL=/etc/php/7.4 /fpm/pool.d/www.conf \
8+ CONF_FPMOVERRIDES=/etc/php/7.4 /fpm/conf.d/overrides.user.ini \
99 APP_ROOT=/app \
1010 SERVER_WORKER_CONNECTIONS=3072 \
1111 SERVER_CLIENT_BODY_BUFFER_SIZE=128k \
@@ -51,10 +51,17 @@ RUN /bin/bash -e /security_updates.sh && \
5151 && \
5252 /bin/bash /clean.sh
5353
54- # Add PHP and support packages \
54+ # Add PHP and support packages
55+ COPY container/root/usr/local/bin/pecl-install /usr/local/bin
5556RUN apt-get update -q && \
56- # Ensure PHP 5.5 + 7.0 + 7.1 don't accidentally get added by PPA
57+ # Ensure old versions of PHP don't accidentally get added by PPA maintainers
5758 apt-mark hold \
59+ apache2 \
60+ apache2-bin \
61+ libapache2-mod-php7.4 \
62+ php5.6-cli \
63+ php5.6-common \
64+ php5.6-json \
5865 php7.0-cli \
5966 php7.0-common \
6067 php7.0-json \
@@ -69,65 +76,84 @@ RUN apt-get update -q && \
6976 php7.3-json \
7077 && \
7178 apt-get -yqq install \
72- php5.6 \
73- php5.6-apcu \
74- php5.6-bcmath \
75- php5.6-bz2 \
76- php5.6-curl \
77- php5.6-dev \
78- php5.6-fpm \
79- php5.6-gd \
80- php5.6-igbinary \
81- php5.6-intl \
82- php5.6-json \
83- php5.6-mbstring \
84- php5.6-mcrypt \
85- php5.6-mysql \
86- php5.6-pgsql \
87- php5.6-memcache \
88- php5.6-memcached \
89- php5.6-xdebug \
90- php5.6-xml \
91- php5.6-yaml \
92- php5.6-zip \
79+ php7.4 \
80+ php7.4-bcmath \
81+ php7.4-bz2 \
82+ php7.4-curl \
83+ php7.4-dev \
84+ php7.4-fpm \
85+ php7.4-gd \
86+ php7.4-intl \
87+ php7.4-json \
88+ php7.4-mbstring \
89+ php7.4-memcache \
90+ php7.4-mysql \
91+ php7.4-pgsql \
92+ php7.4-xdebug \
93+ php7.4-xml \
94+ php7.4-zip \
9395 newrelic-php5 \
9496 newrelic-php5-common \
9597 newrelic-daemon \
98+ # Temporary tweaks to support 7.4-beta
99+ libmemcached-dev \
100+ pkg-config \
101+ zlib1g-dev \
102+ libyaml-dev \
96103 && \
97104 phpdismod pdo_pgsql && \
98105 phpdismod pgsql && \
99- phpdismod yaml && \
100106 phpdismod xdebug && \
101107 # Remove extra extensions installed via packages for other versions of PHP, leaving the active engine folder
102108 rm -rf /usr/lib/php/20121212 && \
109+ rm -rf /usr/lib/php/20131226 && \
103110 rm -rf /usr/lib/php/20151012 && \
104111 rm -rf /usr/lib/php/20160303 && \
105112 rm -rf /usr/lib/php/20170718 && \
113+ rm -rf /usr/lib/php/20180731 && \
114+ rm -rf /usr/lib/php/7.3 && \
106115 curl -sS https://getcomposer.org/installer | php && \
107116 mv composer.phar /usr/local/bin/composer && \
108- # Install new PHP5-stable version of Redis \
109- pecl install redis-4.2.0 && \
110- echo "extension=redis.so" > $CONF_PHPMODS/redis.ini && \
117+ # Install new stable versions of non-packages extensions
118+ pecl-install \
119+ apcu \
120+ igbinary \
121+ redis \
122+ # memcache \
123+ memcached \
124+ msgpack \
125+ yaml \
126+ && \
127+ phpenmod apcu igbinary memcached msgpack && \
111128 # Remove dev packages that were only in place just to compile extensions
112129 apt-get remove --purge -yq \
113- php5.6-dev \
130+ php7.4-dev \
131+ build-essential \
132+ cpp \
133+ cpp-7 \
134+ gcc \
114135 && \
115136 /bin/bash /clean.sh
116137
117138# Overlay the root filesystem from this repo
118139COPY ./container/root /
119140
120- # - Make additional hacks to migrate files/config from 7.0 --> 5.6 folder
141+ # - Make additional hacks to migrate files/config from 7.0 --> 7.4 folder
121142RUN cp /etc/php/7.0/mods-available/* $CONF_PHPMODS && \
122143 cp /etc/php/7.0/fpm/conf.d/overrides.user.ini $CONF_FPMOVERRIDES && \
123- # - Hack: share startup scripts between variant versions by symlinking
124- ln -s /usr/sbin/php-fpm5.6 /usr/sbin/php-fpm && \
144+ # Hack: share startup scripts between variant versions by symlinking \
145+ ln -s /usr/sbin/php-fpm7.4 /usr/sbin/php-fpm && \
125146 # Override default ini values for both CLI + FPM \
126147 phpenmod overrides && \
127148 # Enable NewRelic via Ubuntu symlinks, but disable in file. Cross-variant startup script uncomments with env vars.
128149 phpenmod newrelic && \
129- # - Run standard set of tweaks to ensure runs performant, reliably, and consistent between variants \
130- /bin/bash -e /prep-php.sh
150+ # Run standard set of tweaks to ensure runs performant, reliably, and consistent between variants
151+ /bin/bash -e /prep-php.sh && \
152+ # New 7.3+ specific configuration
153+ sed -i "s/;decorate_workers_output.*/decorate_workers_output = no/" $CONF_FPMPOOL
131154
132- RUN goss -g /tests/php-fpm/5.6.goss.yaml validate && \
155+ # HACK: workaround for https://github.com/aelsabbahy/goss/issues/392
156+ # Run the child and parent test configs separately instead of leveraging inheritance
157+ RUN goss -g /tests/php-fpm/7.4.goss.yaml validate && \
158+ goss -g /tests/php-fpm/base.goss.yaml validate && \
133159 /aufs_hack.sh
0 commit comments