Skip to content

imagebuildah.stageExecutor.Run(): pull images for transient mounts#6690

Merged
lsm5 merged 1 commit into
containers:mainfrom
nalind:build-run-mount-image
Feb 26, 2026
Merged

imagebuildah.stageExecutor.Run(): pull images for transient mounts#6690
lsm5 merged 1 commit into
containers:mainfrom
nalind:build-run-mount-image

Conversation

@nalind
Copy link
Copy Markdown
Member

@nalind nalind commented Feb 17, 2026

What type of PR is this?

/kind bug

What this PR does / why we need it:

When buildah build is passed a --mount option that references an image in its "from" value, instead of pulling the image, as we do when the --mount option is included in the Dockerfile, we would return an error. Correct the difference in behavior.

How to verify it

New integration test!

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

This does nothing for a similar error when buildah run is given a --mount flag which references an image which hasn't been pulled. I'm not sure about that.

Does this PR introduce a user-facing change?

The `--mount` option to `buildah build` no longer fails with an error at RUN instructions if the value for the `--mount` option references an image as its "from" value, and the image has not previously been pulled.

When we're passed a TransientRunMount specification that references an
image by name, be ready to pull the image.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 17, 2026
@nalind nalind added the jira Issues which will be sync'd to a card at https://issues.redhat.com/projects/RUN label Feb 17, 2026
@TomSweeneyRedHat
Copy link
Copy Markdown
Member

LGTM

I restarted the failed test. I'm 95% sure it's a flake, but we'll see.

@TomSweeneyRedHat
Copy link
Copy Markdown
Member

@lsm5 PTAL
If it LGTY, and we can ignore the failing test, please merge.

Copy link
Copy Markdown
Member

@lsm5 lsm5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lsm5 lsm5 merged commit b2e3d9e into containers:main Feb 26, 2026
40 checks passed
@nalind nalind deleted the build-run-mount-image branch February 26, 2026 14:30
@stale-locking-app stale-locking-app Bot locked as resolved and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

jira Issues which will be sync'd to a card at https://issues.redhat.com/projects/RUN locked - please file new issue/PR size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants