Skip to content

Commit 9e015a0

Browse files
committed
Add pipefail to dockerfile instructions
Signed-off-by: Aleksei Khudiakov <[email protected]>
1 parent 47605d2 commit 9e015a0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ ARG NODE_MAJOR
99
ENV NODE_MAJOR=$NODE_MAJOR
1010

1111
# Install system dependencies first - these don't change much
12-
RUN export DEBIAN_FRONTEND=noninteractive \
12+
RUN set -eux; \
13+
export DEBIAN_FRONTEND=noninteractive \
1314
&& apt update \
1415
&& apt install -y --no-install-recommends \
1516
ca-certificates \
@@ -52,7 +53,8 @@ ENV COMPOSER_HOME=/usr/local/share/composer \
5253

5354
# This may look a bit long, but it's just a big `apt install` section, followed by a cleanup,
5455
# so that we get a single compact layer, with not too many layer overwrites.
55-
RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2) \
56+
RUN set -eux; \
57+
export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2) \
5658
&& apt update \
5759
&& apt upgrade -y \
5860
&& apt install -y --no-install-recommends \
@@ -290,7 +292,8 @@ COPY composer.json \
290292
/tools/
291293

292294
# Set default PHP version based on the `composer.json` `config.platform.php` setting
293-
RUN export DEFAULT_PHP_VERSION=$(jq -r '.config.platform.php | sub("(?<minor>[0-9.]).99$"; "\(.minor)")' /tools/composer.json) \
295+
RUN set -eux; \
296+
export DEFAULT_PHP_VERSION=$(jq -r '.config.platform.php | sub("(?<minor>[0-9.]).99$"; "\(.minor)")' /tools/composer.json) \
294297
&& update-alternatives --set php /usr/bin/php$DEFAULT_PHP_VERSION \
295298
&& update-alternatives --set phpize /usr/bin/phpize$DEFAULT_PHP_VERSION \
296299
&& update-alternatives --set php-config /usr/bin/php-config$DEFAULT_PHP_VERSION \

0 commit comments

Comments
 (0)