-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dockerfile2llb: filter unused paths for named contexts
This changes the llb generation in `dockerfile2llb` to add the `llb.FollowPaths` option when named contexts are used in the same way that happens with the default context. This means that dockerfiles that look like this: ``` FROM scratch COPY --from=mynamedctx ./a.txt /a.txt ``` Will only load the file `a.txt`. This behavior is consistent with the default context. This also removes the unused []llb.LocalOption from ContextOpt and updates the `NamedContext` function to return a `NamedContext` struct. The `NamedContext` struct can be used to add additional local filtering options onto the named context. Signed-off-by: Jonathan A. Sternberg <[email protected]>
- Loading branch information
1 parent
bbe48e7
commit 250f926
Showing
6 changed files
with
299 additions
and
97 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.