Kaniko:debug failing on missing file error
We are using the Iron-Bank Kaniko:debug image, registry1.dso.mil/ironbank/opensource/kaniko/kaniko:debug, and we are observing the following error in the related GitLab job:
INFO[0053] ADD https://github.com/gruntwork-io/terragrunt/releases/download/${TERRAGRUNT_VERSION}/terragrunt_linux_amd64 /usr/local/bin/terragrunt INFO[0054] Adding remote URL https://github.com/gruntwork-io/terragrunt/releases/download/v0.30.7/terragrunt_linux_amd64 to /usr/local/bin/terragrunt INFO[0074] Taking snapshot of files... INFO[0074] RUN chmod +x /usr/local/bin/terragrunt INFO[0074] Taking snapshot of full filesystem... INFO[0077] cmd: /bin/sh INFO[0077] args: [-c chmod +x /usr/local/bin/terragrunt] INFO[0077] Running: [/bin/sh -c chmod +x /usr/local/bin/terragrunt] /usr/bin/coreutils: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory error building image: error building stage: failed to execute command: waiting for process to exit: exit status 127 Cleaning up file based variables 00:00 ERROR: Job failed: exit code 1
We have tried this job with the non-Iron-Bank image, gcr.io/kaniko-project/executor:debug, and everything works as expected. I also tried this in another test GitLab environment with different Dockerfiles and with the Iron-Bank Kaniko:debug image, and I got the same above error.
There are two postings on GitHub that appear to be related: libcap.so.2 not found error and Missing files in Kaniko-built image, but in order to test/troubleshoot this issue, I need to be able to exec into a running container from registry1.dso.mil/ironbank/opensource/kaniko/kaniko:debug. I tried this with the following two commands, but neither worked:
docker run -it --entrypoint=/bash/sh registry1.dso.mil/ironbank/opensource/kaniko/kaniko:debug
or
docker run -it --entrypoint=/bin/sh registry1.dso.mil/ironbank/opensource/kaniko/kaniko:debug
When I try these above commands, I get
"/bin/bash": stat /bin/bash: no such file or directory: unknown.
or
"/bin/sh": stat /bin/bash: no such file or directory: unknown.