Skip to content

Dockerfile best practices: clarify behavior of pipefail in RUN steps #11427

Open
@rvsasseen

Description

File: develop/develop-images/dockerfile_best-practices.md

Please consider clarifying whether the pipefail option set by "RUN set -o pipefail &&" carries over to subsequent RUN commands. In a bash script the pipefail setting would carry over to subsequent commands, but it's not clear to me whether it would in a Dockerfile. I would guess maybe the answer is no because no files are affected by the setting and so there's nothing in the resulting layer that preserves the setting.

By the same token, would it work just to "RUN set -o pipefail" once and have it carry over to subsequent RUN commands, or is that not possible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area/buildRelates to Dockerfiles or docker build commandkind/enhancementImproves the usability of docskind/help-wantedRelates to issues/PRs the project wants help onlifecycle/frozen

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions