Skip to content
This repository was archived by the owner on Oct 20, 2021. It is now read-only.

Commit 12e85c6

Browse files
committed
opensuse, fedora, centos*: Fix lint error DL4006
- [DL4006](https://github.com/hadolint/hadolint/wiki/DL4006) states that `-o pipefail` must be passed if using `bash` with a RUN command with pipes.
1 parent f9ff012 commit 12e85c6

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

centos6/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ USER linuxbrew
1313
WORKDIR /home/linuxbrew
1414

1515
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
16-
SHELL=/bin/bash \
1716
USER=linuxbrew
1817

18+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
19+
1920
RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
2021
&& brew config

centos7/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ USER linuxbrew
1313
WORKDIR /home/linuxbrew
1414

1515
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
16-
SHELL=/bin/bash \
1716
USER=linuxbrew
1817

18+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
19+
1920
RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
2021
&& brew config

centos8/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ USER linuxbrew
1313
WORKDIR /home/linuxbrew
1414

1515
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
16-
SHELL=/bin/bash \
1716
USER=linuxbrew
1817

18+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
19+
1920
RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
2021
&& brew config

fedora/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ RUN dnf install -y curl file git glibc-locale-source make ruby rubygem-json ruby
1111
USER linuxbrew
1212
WORKDIR /home/linuxbrew
1313
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
14-
SHELL=/bin/bash \
1514
USER=linuxbrew
1615

16+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1717
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
1818
&& brew config
1919

opensuse/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ RUN zypper --non-interactive install curl git glibc-i18ndata glibc-locale make s
1111
USER linuxbrew
1212
WORKDIR /home/linuxbrew
1313
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
14-
SHELL=/bin/bash \
1514
USER=linuxbrew
1615

16+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
17+
1718
RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
1819
&& brew config
1920

0 commit comments

Comments
 (0)