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

Cannot run sh in a container with udocker #89

Closed
psafont opened this issue Nov 7, 2017 · 3 comments
Closed

Cannot run sh in a container with udocker #89

psafont opened this issue Nov 7, 2017 · 3 comments
Labels

Comments

@psafont
Copy link
Contributor

psafont commented Nov 7, 2017

I'm trying to execute sh in a container, but I get this error:

$ udocker run --rm undu/imagemagick sh
Error: command not found or has no execute bit set:  ['sh']

with docker it work just fine (with --it I can input commands otherwise it finishes instantly)

However if I use its absolute path in the container it works fine:

$ udocker run --rm undu/imagemagick /bin/sh

 ******************************************************************************
 *                                                                            *
 *               STARTING 2c2b0f42-8c5f-3a90-82aa-fcf8aba1a5b3                *
 *                                                                            *
 ******************************************************************************
 executing: sh
2c2b0f42[]$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

As you can see, /bin is also in PATH, other tools in the path (but a different folder) work without needed the absolute path:

$ udocker run --rm undu/imagemagick convert --version

 ******************************************************************************
 *                                                                            *
 *               STARTING 224d472e-5338-3052-97c2-c191b231f504                *
 *                                                                            *
 ******************************************************************************
 executing: convert
Version: ImageMagick 7.0.5-10 Q16 x86_64 2017-06-05 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher HDRI Modules
Delegates (built-in): fontconfig freetype gslib jng jpeg lcms ltdl png ps tiff webp xml zlib

which doesn't work either, it's located in /usr/bin/which, same folder as convert

Any ideas on what might be happening?
Maybe I shouldn't expect it to work like docker?

@jorge-lip jorge-lip added the bug label Nov 7, 2017
@jorge-lip
Copy link
Collaborator

Hi,
No its a bug, fixed on devel branch.
Many thanks !

@psafont
Copy link
Contributor Author

psafont commented Nov 8, 2017

Thanks for the fast response and fix 👍

@psafont psafont closed this as completed Nov 8, 2017
jorge-lip added a commit that referenced this issue Nov 8, 2017
@zoobab
Copy link

zoobab commented Mar 24, 2023

"No its a bug, fixed on devel branch."

@jorge-lip could you point to the commit that solves this issue, because I still have it with v1.3.7...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants