@@ -26,28 +26,34 @@ ENV PHP_CFLAGS="-fstack-protector-strong -fpic -fpie -O2" \
2626
2727# ## configure php
2828# hadolint ignore=DL4006,SC2039,DL3003
29- # hadolint ignore=DL4006,SC2039,DL3003
29+ SHELL [ "/bin/ash" , "-eo" , "pipefail" , "-c" ]
3030RUN set -xe; \
3131 \
3232 chmod 755 /usr/local/bin/docker-entrypoint; \
3333 /usr/local/bin/docker-install-requirements php; \
3434 ln -fs /etc/alternatives/vi /usr/bin/vim; \
3535 mkdir -p /tmp/mhsendmail; \
36- cd /tmp/mhsendmail; \
36+ mkdir -p "${PHP_INI_DIR}/conf.d" ; \
37+ mkdir -p /usr/src;
38+ WORKDIR /tmp/mhsendmail
39+ RUN set -xe; \
40+ \
3741 curl -LkSso /usr/local/bin/mhsendmail 'https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64' && \
3842 chmod 0755 /usr/local/bin/mhsendmail; \
3943 chmod +x /usr/local/bin/mhsendmail; \
40- mkdir -p "${PHP_INI_DIR}/conf.d" ; \
41- mkdir -p /usr/src ; \
42- cd /usr/src; \
44+ WORKDIR /usr/src
45+ RUN set -xe ; \
46+ \
4347 curl -fsSL -o php.tar.xz "$PHP_URL" ; \
44- docker-php-source extract; \
48+ docker-php-source extract;
49+ WORKDIR /usr/src/php
50+ RUN set -xe; \
51+ \
4552 gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" ; \
4653 debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" ; \
4754 if [ ! -d "/usr/include/curl" ]; then \
4855 ln -sT "/usr/include/${debMultiarch}/curl" /usr/local/include/curl; \
4956 fi; \
50- cd /usr/src/php; \
5157 export \
5258 CFLAGS="$PHP_CFLAGS" \
5359 CPPFLAGS="$PHP_CPPFLAGS" \
@@ -131,8 +137,7 @@ RUN set -xe; \
131137 echo 'pm.min_spare_servers = 2' ; \
132138 echo 'pm.max_spare_servers = 5' ; \
133139 echo 'pm.status_path = /status' ; \
134- } | tee /usr/local/etc/php-fpm.d/zz-docker.conf; \
135- /usr/local/bin/docker-layer-clean
140+ } | tee /usr/local/etc/php-fpm.d/zz-docker.conf;
136141
137142# # configure php extensions
138143# hadolint ignore=DL4006,SC2086,DL3003
@@ -181,10 +186,9 @@ ARG TOOLBOX_RUNTIME_REQUIREMENTS_EXTRA=""
181186ARG TOOLBOX_BUILD_REQUIREMENTS=""
182187ARG TOOLBOX_BUILD_REQUIREMENTS_EXTRA=""
183188
184- # hadolint ignore=DL4006
185- RUN set -xe; \
186- \
187- /usr/local/bin/docker-install-requirements toolbox; \
189+ SHELL ["/bin/ash" , "-eo" , "pipefail" , "-c" ]
190+
191+ RUN /usr/local/bin/docker-install-requirements toolbox; \
188192 curl https://rclone.org/install.sh | bash; \
189193 composer require deployer/deployer; \
190194 composer update; \
0 commit comments