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

Commit

Permalink
opensuse, fedora, centos*: Fix lint error DL4006
Browse files Browse the repository at this point in the history
- [DL4006](https://github.com/hadolint/hadolint/wiki/DL4006) states that
  `-o pipefail` must be passed if using `bash` with a RUN command with
  pipes.
  • Loading branch information
issyl0 committed Apr 25, 2020
1 parent f9ff012 commit 12e85c6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion centos6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ USER linuxbrew
WORKDIR /home/linuxbrew

ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
SHELL=/bin/bash \
USER=linuxbrew

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
&& brew config
3 changes: 2 additions & 1 deletion centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ USER linuxbrew
WORKDIR /home/linuxbrew

ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
SHELL=/bin/bash \
USER=linuxbrew

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
&& brew config
3 changes: 2 additions & 1 deletion centos8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ USER linuxbrew
WORKDIR /home/linuxbrew

ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
SHELL=/bin/bash \
USER=linuxbrew

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
&& brew config
2 changes: 1 addition & 1 deletion fedora/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ RUN dnf install -y curl file git glibc-locale-source make ruby rubygem-json ruby
USER linuxbrew
WORKDIR /home/linuxbrew
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
SHELL=/bin/bash \
USER=linuxbrew

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

Expand Down
3 changes: 2 additions & 1 deletion opensuse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ RUN zypper --non-interactive install curl git glibc-i18ndata glibc-locale make s
USER linuxbrew
WORKDIR /home/linuxbrew
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
SHELL=/bin/bash \
USER=linuxbrew

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN yes | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" \
&& brew config

Expand Down

0 comments on commit 12e85c6

Please sign in to comment.