-
Notifications
You must be signed in to change notification settings - Fork 205
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
images: base image specific toybox config and version updates #1525
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1525 +/- ##
=======================================
Coverage 50.04% 50.04%
=======================================
Files 43 43
Lines 4884 4884
=======================================
Hits 2444 2444
Misses 2301 2301
Partials 139 139 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more 📢 Have feedback on the report? Share it here. |
b0c0e42
to
b7184bd
Compare
@mregmi can you please check this on your side using the build flow you have |
@chaitanya1731 can you test this for OCP. Thanks |
Hi @mythi, we tried to test this functionality with sgx initcontainer using
However the image is still built and upon doing RH container preflight certification tests, we got same error like before about modification of the base UBI image -
Could you please take a look. Thanks. |
found this thread about the WARN for |
@chaitanya1731 the collect2 errors are not relevant. I also think that SHELL thing is just a warning. What's strange is that it seems the uses "toybox-config-static" file because you get all the symlinks. For toybox-config-ubi9-micro it should only give grep and lspci. |
So this is the problem. |
Signed-off-by: Mikko Ylinen <[email protected]>
Our *.Dockefile's allow builders to specify FINAL_BASE base image to which static binaries are copied for the final image. Initcontainers install toybox with a minimum set of "coreutils" needed but with some final base images the minimum set can be even smaller since they may already have /bin/sh, ls etc. installed. Make initcontainers to have base image specific toybox-config. For now, "static" for distroles/static and "ubi8-micro" for UBI base image configs are created. At the same time, move the toybox build to "usrmerge" based setup where everything is installed to /usr/bin and /bin is a symlink to /usr/bin. buildkit does not seem to like it so disable buildkit usage for now. Signed-off-by: Mikko Ylinen <[email protected]>
Signed-off-by: Mikko Ylinen <[email protected]>
@chaitanya1731 while we merged this, I'd still be happy to get your report how this works with |
@mythi about this, we tested with the ubi9-micro image.. Just commented the line 32 in build-image.sh where it sets the final base image ARG using --build-arg to distroless. Also in the logs attached above, if you see 3rd line it pulls the ubi9-micro
|
I see. I tested this with ubi8 but I need to double check. Can you check the right toybox config gets used? |
The expected flow works OK for me:
|
@chaitanya1731 Would you be able to confirm? I also tested with With:
I can:
which suggest at least |
Hi @mythi , me and @mregmi double checked this on our ends and we still get the preflight issue.. the test fails with
Looks like its just one file thats being modified now |
We re-create bin -> usr/bin symlink. Can you try ln without force (-f)? |
Fixes: #1506
Our *.Dockefile's allow builders to specify FINAL_BASE base image to which static binaries are copied for the final image.
Initcontainers install toybox with a minimum set of "coreutils" needed but with some final base images the minimum set can be even smaller since they may already have /bin/sh, ls etc. installed.
Make initcontainers to have base image specific toybox-config. For now, "static" for distroles/static and "ubi8-micro" for UBI base image configs are created.
At the same time, move the toybox build to "usrmerge" based setup where everything is installed to /usr/bin and /bin is a symlink to /usr/bin.