-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn is missing files after container is built with kaniko #1071
Comments
This should be fixed now, can you give tag |
@cvgw Thanks for looking in to it 🙏. Re-built from scratch using version above, still failing (it passes with success while building with
Dockerfile: https://gist.github.com/drptbl/92b67ccffa2c14bd78b7100e9d777a24 |
@drptbl which docker image are you using? Are you using one of the tags I suggested? I.E I tested your example Dockerfile with both of those images and it built successfully; perhaps I made an error in testing. Edit: I see the Dockerfile you just linked is not the same one as the original example. I'll take a look at the new one when I have a chance. |
@cvgw I've linked full Dockerfile now and started thread with just short version of it :). I've tested it with |
@cvgw could you please remove |
@drptbl can you provide instructions on how to build the base image in your latest example or share an example that depends on a public base image. Thanks |
example command format:
That's it. You will get an error while building secondary image (
As you can see I'm always clearing cache while trying things, so it's not a case. |
@drptbl I cannot repro with the information you've provided using any of the following images
Can you please include the exact docker command you are using to execute the build Dockerfile base https://gist.github.com/drptbl/3441afdf9b5821d34b8ba399c011d755 docker command
|
@cvgw It didn't work for both commands, with cache and without, tried both. Also didn't work with other combinations (tried adding
Keep in mind that it also doesn't work for me if I remove I'm building it on latest stable Kubernetes (gke) through GitLab using kaniko docker image (
GitLab config (this way my repo is mounted by default on root dir, using image directly without
@edit adding |
@drptbl can you please try it using a local docker daemon rather than gitlab's runner |
@cvgw Tested on macOS locally and it worked fine. Some dependencies are missing? Thanks for helping me out and digging in to it. |
Thanks for testing @drptbl. I've never used gitlab before but I'm setting an account up now to debug this. |
@cvgw I can see how much this tool has reduced ours CI build time, even if output builds aren't usable (yet). Happy to help for such a great project :). Ask me anything. |
@drptbl I wasn't able to repro this on Gitlab either; I'm guessing something is different about how I set things up. My runner is installed on a GKE cluster Dockerfile base https://gist.github.com/drptbl/3441afdf9b5821d34b8ba399c011d755 .gitlab-ci.yml
kaniko image |
@cvgw just to confirm, I'm building base image with kaniko and then e2e image with kaniko. You wrote that you built base with docker. Did you mean kaniko or docker? Maybe the case is that base has to be built with kaniko too? Flow:
|
I indeed built my base image with docker; I'll try building it with kaniko and report back |
@cvgw tried v0.18.0-debug, same error. |
@cvgw tried v0.19.0-debug, same error. |
I also have this issue on gitlab runners, with a dockerfile that uses npm to build a project and my /usr/src/app/dist/ went missing when building with kaniko. i switched back to dind for now. My docker file:
|
Yup, there is no other way. I hope it will be fixed soon, kaniko is a great project 🎉. |
Hello there! I'm running Kaniko in Kubernetes as a temporary pod. The Dockerfile is rather large, but nothing seemed to help the fact that all files were deleted once Kaniko pushed the built image to the destination. My solution came from changing the executor's build options. Pod args:
I used to have the |
Perhaps related to #2065 ? |
Dockerfile with
yarn
is missing files after container is built with kaniko, tried on 0.17.1 and 0.16.0:.. now if you pull this image and
cd /opt/yarn-v1.22.0/
you will notice empty folders without files.The text was updated successfully, but these errors were encountered: