Skip to content
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

kaniko build brokes building image common libraries #3339

Open
edib opened this issue Oct 10, 2024 · 1 comment
Open

kaniko build brokes building image common libraries #3339

edib opened this issue Oct 10, 2024 · 1 comment

Comments

@edib
Copy link

edib commented Oct 10, 2024

Actual behavior
A clear and concise description of what the bug is.
I have a custom kaniko image that combines Kaniko and git and in gitlab-ci pipeline after kaniko being executed brokes its building container library dependencies.
$ git config --global user.email "[email protected]" && git config --global user.name "Gitlab-ci"
git: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by git)

Expected behavior
A clear and concise description of what you expected to happen.
above command should run

To Reproduce
Steps to reproduce the behavior:

  1. I have tried alpine and debian and ubunutu base images. all are same.

Additional Information

  • Dockerfile
FROM gcr.io/kaniko-project/executor:latest AS kaniko

FROM dotnet-sdk:6.0.1-nuget

RUN apt-get update && \
   apt-get install -y git \
   apt-get clean && \
   rm -rf /var/lib/apt/lists/*

COPY --from=kaniko /kaniko/executor /kaniko/executor
COPY --from=kaniko /etc/nsswitch.conf /etc/nsswitch.conf
COPY --from=kaniko /kaniko/.docker /kaniko/.docker

RUN dotnet  tool install --global dotnet-sonarscanner

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
@mzihlmann
Copy link

mzihlmann commented Oct 15, 2024

https://github.com/GoogleContainerTools/kaniko#known-issues

Running kaniko in any Docker image other than the official kaniko image is not supported due to implementation details.

Specifically it is not sufficient to copy the kaniko binary. kaniko depends on the entire filetree being in its expected state.
This is not so much a "known issue" but a fundamental design constraint when building an image inside your own container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@edib @mzihlmann and others