Missing files from docker image
See original GitHub issueBug
Current Behavior
It seems sometimes the garden.io builds incorrectly the docker image. Somehow one file is missing from the image that is there in the source folder in my machine. Files are missing according to the error log. The missing file is not always the same.
garden build
-> The build is successful.
garden deploy
-> The deploy process sometimes works fine, sometimes fails with a custom error (because of the missing files). Moreover, when the deployment process is fine too, sometimes the running pod crashes because of the same error. So either shows the error already during deployment or in the running container after deployment.
It’s important to mention that sometimes everything works great, and then after a few minutes this error occurs, even though nothing changes in the source code that can cause it. It seems random to me.
If I see in the container what is built from the image what the garden.io built, I really can’t find the files there that should be there.
Expected behavior
Workaround
Need to run the garden deploy
or garden dev
more than once. It can be up to 10.
Your environment
- OS: Windows 10
- Garden.io version: 0.12.18
- How I’m running Kubernetes: Remote cluster
- buildMode: cluster-docker
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (1 by maintainers)
Sorry, should have clarified, that’s an environment variable in your shell.
@edvald I think I’m facing a similar problem.
garden deploy
(v0.12.44) fails withI have tried
GARDEN_LEGACY_BUILD_STAGE=true garden deploy
, same error.My
.garden
is very minimal:My
Dockerfile.dockerignore
:I’ve checked
.garden/build/<project>/
in monorepo root folder and it is missing thetmp
folder, which exists in my project directory and is not excluded inDockerfile.dockerignore
. The.garden/build/<project>/
folder, is also missing the aforementioned dockerignore file.What drives the list of files that are being copied to
build
folder?Also I wonder, why does garden even need to copy all the module files to that project
.garden/build/
folder? It looks inefficient. If I were to use garden in all my projects in the monorepo (I’m currently evaluating garden) it seems, I would end up with almost a copy my monorepo in that.garden/build
folder…