eth-cscs/sarus

Issue when just appending flags for image with entrypoint set

haampie opened this issue ยท 2 comments

Currently I cannot do:

$ sarus run gcr.io/kaniko-project/executor --dockerfile something
Invalid image ID ["gcr.io/kaniko-project/executor", "--dockerfile"]
The image ID is expected to be a single token without options
See 'sarus help run'

Whereas docker run gcr.io/kaniko-project/executor --dockerfile /something works.

Note that I cannot just provide the binary like docker run gcr.io/kaniko-project/executor /kaniko/executor --dockerfile /something, because there is no shell or anything (see https://github.com/GoogleContainerTools/kaniko/blob/master/deploy/Dockerfile#L35)

The workaround seems to be adding '' as an initial argument:

$ sarus run gcr.io/kaniko-project/executor '' --dockerfile something

Can this be avoided?

Hello @haampie, thanks for the report!
Improvements for the CLI are in the works, we'll do our best to have a look into this behavior as well.

Hi @haampie,
as of release 1.3.0, Sarus correctly processes option arguments entered after the image identifier:

amadonna@localhost:~> sarus run --entrypoint=ls ubuntu -l -a /home
total 0
drwxr-xr-x 2 amadonna amadonna   3 Apr 15  2020 .
drwxr-xr-x 1 amadonna amadonna 140 Oct 23 19:17 ..

Let me know if you still encounter problems with the new version or I can close this issue.