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

images: use buildkit again #1615

Merged
merged 1 commit into from
Dec 8, 2023
Merged

images: use buildkit again #1615

merged 1 commit into from
Dec 8, 2023

Conversation

mythi
Copy link
Contributor

@mythi mythi commented Dec 7, 2023

The Toybox images had two issues:

  1. Distroless does not support /bin -> /usr/bin so we needed to create it manually to get /bin/bash for Toybox. However, with this Openshift image validation complains that we are touching the "base" image.

  2. We could not use buildkit since it fails with /bin symlink copied over /bin directory from Distroless.

The simple fix is just to move away from all /bin/sh and /bin/bash and use "/usr/bin/env bash" to resolve the path instead. This allows to keep /bin untouched.

@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (56d747e) 51.79% compared to head (42fa70e) 51.79%.
Report is 2 commits behind head on main.

❗ Current head 42fa70e differs from pull request most recent head e02c480. Consider uploading reports for the commit e02c480 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1615   +/-   ##
=======================================
  Coverage   51.79%   51.79%           
=======================================
  Files          42       42           
  Lines        4873     4873           
=======================================
  Hits         2524     2524           
  Misses       2204     2204           
  Partials      145      145           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The Toybox images had two issues:

1. Distroless does not support /bin -> /usr/bin so we needed to
create it manually to get /bin/bash for Toybox. However, with this
Openshift image validation complains that we are touching the "base"
image.

2. We could not use buildkit since it fails with /bin symlink
copied over /bin directory from Distroless.

The simple fix is just to move away from all /bin/sh and /bin/bash
and use "/usr/bin/env bash" to resolve the path instead. This allows
to keep /bin untouched.

Signed-off-by: Mikko Ylinen <[email protected]>
@mythi mythi marked this pull request as ready for review December 8, 2023 06:12
@tkatila tkatila merged commit de8f196 into intel:main Dec 8, 2023
77 checks passed
@eero-t
Copy link
Contributor

eero-t commented Dec 8, 2023

What's the point of adding (GPL v3) Bash when using Toybox (which is non-GPL remake of Busybox)?

On quick look at the scripts, there's nothing in them needing Bash, plain POSIX shell should be fine...

@mythi
Copy link
Contributor Author

mythi commented Dec 9, 2023

What's the point of adding (GPL v3) Bash when using Toybox (which is non-GPL remake of Busybox)?

It's the symlink toybox provides:

ls -la /usr/bin
...
lrwxrwxrwx 1 root root      6 2023-12-07 17:47 bash -> toybox

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 this pull request may close these issues.

4 participants