Closed xgalaxy closed 1 year ago
I figured out what the problem is.
If you create an image with the above criteria mentioned in the ticket. And do nothing else but add a .dockerignore
something, somewhere will never adhere to the dockerignore file.
Only until I purged the image and rebuilt it from scratch did it start adhering to the dockerignore thereafter.
Weird issue.
What happened?
.dockerignore
file is being.. well.. ignored when doingdevspace deploy
:)If a dockerfile contains the contents:
Files listed in the
.dockerignore
get copied into the image anyway. This also results in a needless cache invalidation of that image layer. Which was reported in 2021 here.What did you expect to happen instead?
The
.dockerignore
file should be respected when doing a deploy.How can we reproduce the bug? (as minimally and precisely as possible)
My devspace.yaml:
My dockerfile:
My .dockerignore
Local Environment:
Client Version: v1.28.2 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.27.3
Anything else we should know: Same setup transported to Tilt does not exhibit this behavior. So I don't think this is a docker/buildkit bug.