Scaffolded .dockerignore
does not do what it claims
#2073
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Milestone
When running
make docker-build
for an operator scaffolded with kubebuilder v3, the entire directory is included in the Docker build context.I expected only Go source files to be included in the Docker build context. Here is the scaffolded
.dockerignore
file:To reproduce, build a dummy Docker image containing the entire build context:
Now run it:
Or explore the images contents:
I've traced the issue to this source code:
kubebuilder/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerignore.go
Lines 41 to 46 in 2018a4f
For reference, this is my Docker version:
/kind bug
The text was updated successfully, but these errors were encountered: