rancher / kim

In ur kubernetes, buildin ur imagez
Apache License 2.0
326 stars 19 forks source link

Consider updating buildkit #92

Open jpambrun opened 11 months ago

jpambrun commented 11 months ago

First, I am not sure if Kim is still maintained, but it sure is still super useful to build images for k3s.

kim fails to build this simple Dockerfile with the default buildkit

FROM python:slim
RUN apt-get update

With this error:

#4 [2/2] RUN apt-get  update
#4 sha256:3396cd45c9a54b00133aaeef88c090d0dd0e11ffb14d55ab1d6f924a29b4e594
#4 0.134 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
#4 0.147 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
#4 0.149 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
#4 0.201 Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8780 kB]
#4 0.253 Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [6408 B]
#4 0.283 Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [79.7 kB]
#4 1.139 Fetched 9117 kB in 1s (8907 kB/s)
#4 1.139 Reading package lists...
#4 1.603 E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
#4 1.603 E: Sub-process returned an error code
#4 ERROR: executor failed running [/bin/sh -c apt-get  update]: exit code: 100
------
 > [2/2] RUN apt-get  update:
------
Error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get  update]: exit code: 100 

Googling suggest it could be an incompatibility issue with Docker version and the recent version Debian bookworm.

I can work around it by using a newer buildkit version, but it would be nice to update the defaults:

kim builder install --buildkit-image docker.io/moby/buildkit:v0.12.2
dweomer commented 7 months ago

I think kim got bit by the runc capabilities mismatch that was giving permission errors running perfectly legit containers on glibc hosts a couple years back. I left employment at SUSE for over a year but sorta came back recently-ish (I work for RGS aka Rancher Federal now) and am seeking to refresh this project.