Skip to content

Conversation

@jsternberg
Copy link
Collaborator

@jsternberg jsternberg commented Oct 3, 2025

This utilizes the container filesystem for the file explorer instead of
using the reference directly. For the error condition, this allows us to
gain access to the filesystem when the error happened with its current
state at the time of the error rather than before the step even ran.

A better solution for resolving #3410. Relies on functionality in moby/buildkit#6262.

…ile system

The container filesystem request API that has been added to buildkit
allows a container created through the `NewContainer` API to also access
the filesystems. This is useful when an error occurs because it allows
us to grab the mutable state of the mounts used during the actual build
rather than the input version copies which don't contain any files that
were added as part of the failed command.

This gives us a more accurate view of the filesystem that was previously
only accessible through using `exec` and `ls`/`cat` commands that may
not always exist.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
@jsternberg jsternberg force-pushed the dap-container-fs-requests branch from 98779f9 to e9d6ba0 Compare January 26, 2026 20:23
@jsternberg jsternberg marked this pull request as ready for review January 26, 2026 20:25
@jsternberg
Copy link
Collaborator Author

Finally had time to come back to this and update it for what got merged. It's tested and works with the capability detection. When the capability isn't present, it will not attempt to use the result handle which causes it not to include cache mounts. When the capability is there, cache mounts are present.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant