Hi! I just installed this and am happy I can delete the dedicated VPS for my runner. I am adapting my workflows, but I am having problems with Docker builds, because it's not caching image layers. I exec'ed into the runner and saw that after each build docker images returns nothing.
What can I do to prevent each build from starting from scratch?
Thanks!
Also, it seems I cannot run commands with sudo?
Also, it seems I cannot run commands with sudo?
Probably we need to add the runner user to sudoers?
Would you mind giving it a shot? I'm more than happy yo review if you could submit a PR for that!
it's not caching image layers
This is by-design atm. The --once flag we're consistently passing in the runner entrypoint here instructs the runner to stop/restart from the scratch on each build. Stopping a runner pod does stops the dockerd sidecar in it, hence the docker image cache is wiped out.
Perhaps we can have an additional field in the Runner CRD to make it configurable.
Also - --once is preferable for reproducible builds. So an alternative way would be to deploy an in-cluster docker image registry for caching images, from where you can pull the image on each build.
Which way do you prefer?
Hi, I can send a small PR for the user thing.
As for the caching, do you mean --cache-from?
Yeah - More concretely, I believe adding your docker-build a --cache-from to a in-cluster docker registry, and adding docker push against the in-cluster registry in the very end of your build would help reducing the build time.
OK, I will try installing Harbor in my cluster and use that. Thanks for the suggestion!
I've been using Harbor as in cluster registry and --cache-from. It's not as fast as using the local cache due to the pull required, but it's a lot better than building from scratch. Thanks a lot again, this project saved me the time to do something similar :)