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

v4 image claims to be Debian Bullseye but is actually Bookworm #780

Closed
thockin opened this issue Jul 27, 2023 · 3 comments · Fixed by #781
Closed

v4 image claims to be Debian Bullseye but is actually Bookworm #780

thockin opened this issue Jul 27, 2023 · 3 comments · Fixed by #781
Assignees

Comments

@thockin
Copy link
Member

thockin commented Jul 27, 2023

$ docker run -ti --entrypoint "" gcr.io/k8s-staging-git-sync/git-sync:v4.0.0-rc3 cat /etc/debian_version
11.7

$ docker run -ti --entrypoint "" registry.k8s.io/build-image/debian-base:bookworm-v1.0.0 cat /etc/debian_version
12.0

$ docker run -ti --entrypoint "" gcr.io/k8s-staging-git-sync/git-sync:v4.0.0-rc3 cat /etc/os-release
PRETTY_NAME="Distroless"
NAME="Debian GNU/Linux"
ID="debian"
VERSION_ID="11"
VERSION="Debian GNU/Linux 11 (bullseye)"
HOME_URL="https://github.com/GoogleContainerTools/distroless"
SUPPORT_URL="https://github.com/GoogleContainerTools/distroless/blob/master/README.md"
BUG_REPORT_URL="https://github.com/GoogleContainerTools/distroless/issues/new"
@renxunsaky
Copy link

Thanks for creating this issue.
So, the problem is from this line as said in the closed issue #773
https://github.com/kubernetes/git-sync/blob/v4.0.0-rc3/Dockerfile.in#L107C13-L107C25

Maybe we should be more selective while copying the files.

@renxunsaky
Copy link

I think we should not use the distroless/base image as intermediate one until there is bookworm version. Because when we install libraries inside this distroless/base, it will install libraries, like openssh, libssl1.1 etc. for the OS 11. In that case, it retrieves the vulnerabilities of the version 11. Then these libraries are copied from the intermediate image to the final one.

@thockin
Copy link
Member Author

thockin commented Jul 27, 2023

distroless serves the purpose of populating things like /etc and /dev and ca-certificates.

To drop distroless we either do that all ourselves or we find a workable replacement. chainguard's static may fit the bill, but it purports to be alpine instead of debian, so I'm not sure it will be as easy as I'd like.

Out of time for today, but this is clearly a v4 release blocker.

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

Successfully merging a pull request may close this issue.

2 participants