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

image-puller assumes that /bin/sh is present #3205

Open
mattijsjonker opened this issue Aug 17, 2023 · 2 comments
Open

image-puller assumes that /bin/sh is present #3205

mattijsjonker opened this issue Aug 17, 2023 · 2 comments

Comments

@mattijsjonker
Copy link

- name: image-pull-singleuser-init-and-extra-containers-{{ $k }}
image: {{ $container.image }}
command:
- /bin/sh
- -c
- echo "Pulling complete"

It appears that the image puller assumes that /bin/sh is always available. In my setup this is causing an issue because one of the configured singleuser.extraContainers images is scratch-based, resulting in CrashLookBackoffs on the continuous-image-puller pods:

  image-pull-singleuser-init-and-extra-containers-0:
    Container ID:  containerd://<id>
    Image:         minio/sidekick:v3.0.4
    Image ID:      docker.io/minio/sidekick@sha256:<hash>
    Port:          <none>
    Host Port:     <none>
    Command:
      /bin/sh
      -c
      echo "Pulling complete"
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       StartError
      Message:      failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown
      Exit Code:    128
      Started:      Thu, 01 Jan 1970 00:00:00 +0000
      Finished:     Thu, 17 Aug 2023 10:33:10 +0000
    Ready:          False
    Restart Count:  1
    Environment:  <none>
    Mounts:       <none>

The image in question (https://github.com/minio/sidekick/blob/master/Dockerfile).

I remedied this by creating a custom image that does include /bin/sh, but I wonder if a more elegant solution is possible (e.g., a configurable check).

@welcome
Copy link

welcome bot commented Aug 17, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@yuvipanda
Copy link
Collaborator

Good question. We must have a command here, and one that essentially does nothing (rather than start the default cmd for the image). /bin/sh was chosen as the most common thing to exist here. I'm not sure we can do something else - scratch based containers by definition are unique and usually don't have anything else in them.

Perhaps what we need is to document this requirement?

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

No branches or pull requests

2 participants