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

On Dockerfiles, allow filepaths to be excluded from ADD and COPY commands #4440

Conversation

leandrosansilva
Copy link
Contributor

Ref #4439

This PR introduces new options in the Dockerfile frontend, namely --exclude on COPY and ADD commands.

It essentially exposes the existing ExcludePatterns from the LLB to the frontend.

More information in the related issue #4439.

I did manage to only run the integration tests in the frontend directory, which were the only parts changed, via, as all the other tests fail running to me, even when I am on master.

I am open to suggestions on how to better test those changes, as I am not yet familiar with the codebase.

TESTPKGS=./frontend ./hack/test integration

It exposes the `ExcludePatterns` to the Dockerfile frontend, adding
`--exclude=<pattern>` option in the COPY and ADD commands, which will
cause filepaths matching such patterns not to be copied.

`--exclude` can be used multiple times.

Signed-off-by: Leandro Santiago <[email protected]>
@leandrosansilva leandrosansilva force-pushed the feature/exclude-pattern-on-dockerfile branch from 3baf644 to 1078af8 Compare November 25, 2023 12:40
@tonistiigi
Copy link
Member

I'm closing this for now. Not because we don't want it but because the design was not confirmed, and I don't want multiple places discussing this. Once there is some agreement in #4439, you can reopen. If you want to try things with CI then reopen as draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants