Open chrw opened 4 years ago
HI @chrw,
I faced the same issue today in my jenkins pipeline. after some tests i figured out this was related to the kaniko filesytem. In my pipeline i was building 2 images in serial, and the only one failing was the second one.
By adding the --cleanup --cache=false
to the kaniko executor command fixed the issue.
Hope it helps
@pedroparraortega Kaniko pod wasn't designed to be re-used @chrw Are you re-using the same kaniko pod?
@pedroparraortega Kaniko pod wasn't designed to be re-used @chrw Are you re-using the same kaniko pod?
What do you mean by re-using the same Kaniko pod? Gitlab CI is running the official Kaniko docker image and builds the Dockerfile I mentioned above. I'm not running Gitlab CI on Kubernetes. It's a plain Ubuntu 20.04 LTS EC2 Instance with Docker installed. The Gitlab CI Runner on the Host Machine is using the Docker executor.
Thanks for the hint @pedroparraortega, I will give it a try! 😊
Faced same issue with kubernetes executor when both 0.23.0 AND 1.0.0 kaniko versions messed up with one registry cache. Cache cleanup and separation in registry (--cache-repo) works for me.
Hmm, I am wrong, v1.0.0 only able to reproduce it from clean cache state :-(
"me too"
Cleaning out my docker setup now and will check in.
I confirm that adding --cleanup --cache=false
to my kaniko command resolve the issue.
Thank you @pedroparraortega.
I also can't install bash in alpine. To be more precise, I can install it but the package isn't available in the target image. Adding --cleanup --cache=false
sadly did not resolve the issue, so I opened an issue here: #2177
Actual behavior
I have the following Dockerfile in place.
I create the container using Kaniko in the current version (v0.23.0) within Gitlab CI using the Docke executor with the official kaniko container image.
If I try to run bash, I get the following error message.
Readline is installed though
If I reinstall
bash
within the container itself, it's working.If I build the container using the common
docker
commands, it's not an issue. This is my workaround for now, but I have to install thedocker
tooling.Expected behavior
I want to run
bash
without this error message.To Reproduce See first section.
Additional Information
Kaniko Image (fully qualified with digest)
Triage Notes for the Maintainers
--cache
flag