pkg: exclude Dockerfile from COPY in all packages#5732
Conversation
98d54ef to
e38e80c
Compare
|
@christoph-zededa why don't we use |
I want it to be visible f.e. when somebody looks up how it is done or copies some lines. |
e38e80c to
83f37b7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5732 +/- ##
===========================================
+ Coverage 19.52% 29.87% +10.34%
===========================================
Files 19 18 -1
Lines 3021 2417 -604
===========================================
+ Hits 590 722 +132
+ Misses 2310 1549 -761
- Partials 121 146 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@christoph-zededa you need to at least add the exception for Yetus.... since the
The problem is that by doing that you are introducing more parser errors to hadolint ( |
Add a .dockerignore file with Dockerfile to each package that uses COPY . in its Dockerfile. This prevents the Dockerfile itself from being copied into the image, so the docker hashes bumper does not have to run several times anymore. pkg/installer already had a .dockerignore covering this case. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Christoph Ostarek <christoph@zededa.com>
83f37b7 to
c08bd97
Compare
|
/rerun red |
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.