Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec: allow specifying non-zero exit codes for execs #5339

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

jedevc
Copy link
Member

@jedevc jedevc commented Sep 16, 2024

Proposed originally in slack: https://dockercommunity.slack.com/archives/C7S7A40MP/p1724155627856519

Been trying to play around a bit and was looking to see if we could have a way of expressing LLB that had a non-zero expected exit code. It would be nice, since some build steps are sometimes expected to "fail", and sometimes tools have "interesting" return code semantics, that it would be nice to connect into.

Maybe an Exec Meta property?

Turns out to be fairly trivial to plumb through, don't think there should be anything too controversial here.

I'll leave it to docker folks though to determine if this should be exposed in the dockerfile syntax in the future, I could imagine a --exit flag for RUN which would be nice. Though I think probably out-of-scope for this initial PR.

solver/pb/ops.proto Outdated Show resolved Hide resolved
executor/runcexecutor/executor.go Outdated Show resolved Hide resolved
Signed-off-by: Justin Chadwell <me@jedevc.com>
@tonistiigi tonistiigi merged commit e15601a into moby:master Sep 17, 2024
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants