exporter: add src option to local and tar exporters - #7117
Open
alexgwolff wants to merge 1 commit into
Open
Conversation
Adds a `src` option to the local and tar exporters, so a subdirectory of the
build result can be exported without a dedicated scratch stage.
buildctl build ... --output type=local,dest=./out,src=/usr/src/app/reports
The contents of `src` land at the root of the destination. Symlinks are resolved
within the build result via `fs.RootPath`, so an absolute symlink in the image
cannot escape to the daemon's filesystem.
`src` takes a single literal path, so the glob patterns raised in the issue are
not covered. Two further cases are deliberately left out and can follow up
depending on what you prefer: an empty `src=` combined with `mode=delete`, and
`src` pointing at a single file rather than a directory.
Updates moby#874
Signed-off-by: Alex G. Wolff <13754094+alexgwolff@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
srcoption to the local and tar exporters, so a subdirectory of thebuild result can be exported without a dedicated scratch stage.
The contents of
srcland at the root of the destination. Symlinks are resolvedwithin the build result via
fs.RootPath, so an absolute symlink in the imagecannot escape to the daemon's filesystem.
srctakes a single literal path, so the glob patterns raised in the issue arenot covered
related #874