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

Error when using run image without bash #246

Open
c0d1ngm0nk3y opened this issue Sep 11, 2024 · 3 comments · May be fixed by #247
Open

Error when using run image without bash #246

c0d1ngm0nk3y opened this issue Sep 11, 2024 · 3 comments · May be fixed by #247

Comments

@c0d1ngm0nk3y
Copy link

Only for very specific stacks, the processes are started with direct: true which doesn't require a bash to be present.

If you use a run image for another stack, bash will be used.

Expected Behavior

It should work by calling the process directly.

Current Behavior

If no bash is present on the run image, you get the error

ERROR: failed to launch: bash exec: no such file or directory

Possible Solution

I see 2 possible solutions

  1. This is staight forward - just supprt BUILDPACK_API 0.9 like discussed in this issue. Then all processes would be started directly.

  2. Introduce an environment variable BP_DIRECT_PROCESS (defaults to false) which controls how to set direct.

Steps to Reproduce

Unfortunately, it is not possible to reproduce with paketo images since bionic.tiny and jammy.tiny are hardcoded to work. noble.tiny would be broken too, but unfortunately, there is no builder yet released with noble (why?).

But I created this simple nodejs based sample to reproduce.

Motivations

We want to use a minimal run image and not having a bash in there for no real reason.

@modulo11
Copy link

This sounds like a reasonable workaround until the new libcnb version is out. @dmikusa wdyt?

@loewenstein
Copy link

This sounds like a reasonable workaround until the new libcnb version is out. @dmikusa wdyt?

I agree and would also appreciate taking this workaround in while we do not have a concrete upgrade plan to libcnb@v2. In particular, because even with a plan in place, we would probably still talk about weeks if not months until the procfile would be based on v2 and the problem be fixed. @paketo-buildpacks/utilities-maintainers WDYT?

@dmikusa
Copy link
Contributor

dmikusa commented Sep 18, 2024

It sounds good to me. I have a few minor notes about how we phrase this, but functionality is 👍.

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.

4 participants