Skip to content

Commit a5fbfa7

Browse files
authored
Merge pull request #15 from smortexa/improve
add `SHELL` instruction
2 parents a54ef8c + 5d7f054 commit a5fbfa7

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ ENV DEBIAN_FRONTEND=noninteractive \
4242

4343
WORKDIR /var/www/html
4444

45+
SHELL ["/bin/bash", "-eou", "pipefail", "-c"]
46+
4547
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
4648
&& echo $TZ > /etc/timezone
4749

48-
RUN set -eu; \
49-
apt-get update; \
50+
RUN apt-get update; \
5051
apt-get upgrade -yqq; \
5152
pecl -q channel-update pecl.php.net; \
5253
apt-get install -yqq --no-install-recommends --show-progress \
@@ -156,7 +157,6 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
156157
ARG INSTALL_RDKAFKA=true
157158

158159
RUN if [ ${INSTALL_RDKAFKA} = true ]; then \
159-
set -eu; \
160160
apt-get install -yqq --no-install-recommends --show-progress librdkafka-dev \
161161
&& pecl -q install -o -f rdkafka \
162162
&& docker-php-ext-enable rdkafka; \
@@ -169,9 +169,7 @@ RUN if [ ${INSTALL_RDKAFKA} = true ]; then \
169169
ARG INSTALL_SWOOLE=true
170170
ARG SERVER=openswoole
171171

172-
RUN set -eu; \
173-
if [ ${INSTALL_SWOOLE} = true ]; then \
174-
set -eu; \
172+
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
175173
apt-get install -yqq --no-install-recommends --show-progress libc-ares-dev \
176174
&& pecl -q install -o -f -D 'enable-openssl="yes" enable-http2="yes" enable-swoole-curl="yes" enable-mysqlnd="yes" enable-cares="yes"' ${SERVER} \
177175
&& docker-php-ext-enable ${SERVER}; \
@@ -184,7 +182,6 @@ RUN set -eu; \
184182
ARG INSTALL_INTL=true
185183

186184
RUN if [ ${INSTALL_INTL} = true ]; then \
187-
set -eu; \
188185
apt-get install -yqq --no-install-recommends --show-progress zlib1g-dev libicu-dev g++ \
189186
&& docker-php-ext-configure intl \
190187
&& docker-php-ext-install intl; \
@@ -207,7 +204,6 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
207204
ARG INSTALL_MYSQL_CLIENT=true
208205

209206
RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
210-
set -eu; \
211207
apt-get install -yqq --no-install-recommends --show-progress default-mysql-client; \
212208
fi
213209

@@ -239,7 +235,6 @@ ARG INSTALL_PG_CLIENT=false
239235
ARG INSTALL_POSTGIS=false
240236

241237
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
242-
set -eu; \
243238
. /etc/os-release \
244239
&& echo "deb http://apt.postgresql.org/pub/repos/apt $VERSION_CODENAME-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
245240
&& curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \

0 commit comments

Comments
 (0)