pkg: exclude Dockerfile from COPY in all packages#5732
Draft
christoph-zededa wants to merge 1 commit intolf-edge:masterfrom
Draft
pkg: exclude Dockerfile from COPY in all packages#5732christoph-zededa wants to merge 1 commit intolf-edge:masterfrom
christoph-zededa wants to merge 1 commit intolf-edge:masterfrom
Conversation
Use COPY --exclude=Dockerfile to prevent the Dockerfile itself from being copied into the image. Add syntax=docker/dockerfile:1.19.0 directive to Dockerfiles that lacked it to enable the --exclude flag. This way the docker hashes bumper does not have to run several times anymore. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Christoph Ostarek <christoph@zededa.com>
98d54ef to
e38e80c
Compare
Contributor
|
@christoph-zededa why don't we use |
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.
Description
Use COPY --exclude=Dockerfile to prevent the Dockerfile itself from being copied into the image. Add syntax=docker/dockerfile:1.19.0 directive to Dockerfiles that lacked it to enable the --exclude flag.
This way the docker hashes bumper does not have to run several times anymore.
How to test and validate this PR
Check that the image still compiles correctly.
Changelog notes
Build improvement
PR Backports
For all current LTS branches, please state explicitly if this PR should be
backported or not. This section is used by our scripts to track the backports,
so, please, do not omit it.
Here is the list of current LTS branches (it should be always up to date):
Checklist
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.