Can enroot run docker images that don't contain /bin/sh?

Open
#264 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
docker
Domain
cli, devops

Research direction

Start with the enroot start entry point and the enroot-switchroot failure shown in the report, using the provided Java command and image as the reproduction. Trace why /bin/sh is required and verify that the image can directly execute /usr/bin/java without it; done means the supplied command runs successfully in the image.

Written by the indexing model from the issue text.

Description

Hi,
I am trying to run jyxsu6/medagentbench:latest with enroot which doesn't contain a /bin/sh since it executes a java binary inside docker. However, when I try to run the enroot image, I get
enroot-switchroot: failed to execute: /bin/sh: No such file or directory
Which implies that enroot is ignoring the cmd argument or assuming cmd argument need to be run within a shell environment.
What I am running is
enroot start -e JAVA_TOOL_OPTIONS='-XX:+UseSerialGC -Xms256m -Xmx1024m' jyxsu6_medagentbench_latest /usr/bin/java "--class-path" "/app/main.war" '-Dloader.path=main.war!/WEB-INF/classes/,main.war!/WEB-INF/,/app/extra-classes' 'org.springframework.boot.loader.PropertiesLauncher'
which is essentially the exec command of the container. Is there a way to bypass the requirement of /bin/sh and directly execute the binary?

Dominant language
Shell
Stars
1.1k
Forks
139
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/enroot

All issues in NVIDIA/enroot

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.