orientdb-docker icon indicating copy to clipboard operation
orientdb-docker copied to clipboard

./bin/gremlin.sh requires bash, but only sh is available in container

Open tswaters opened this issue 7 years ago • 2 comments

$ docker run --rm -d --name orientdb -p 2424:2424 -p 2480:2480 -e ORIENTDB_ROOT_PASSWORD=test -e ORIENTDB_NODE_NAME=odb1 orientdb:3.0.3-tp3 /orientdb/bin/server.sh -Ddistributed=true
{sha}

$ docker exec -it {sha} /bin/orientdb/gremlin.sh
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "no such file or directory": unknown

I tried to rename the shebang in this file to /bin/sh but the script itself doesn't like that, failing with an error:

$ docker exec -it {sha} /orientdb/bin/gremlin.sh
/orientdb/bin/gremlin.sh: line 45: syntax error: unexpected redirection

I ended up just installing bash --

$ docker exec -it {sha} apk add --no-cache bash gawk sed grep bc coreutils

With that done, it works as expected:

$ docker exec -it {sha} /orientdb/bin/gremlin.sh

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
gremlin> 

tswaters avatar Jul 09 '18 23:07 tswaters

This helped me a lot! I was having the exact same issue, thank you for this. I think that bash should be included if gremlin.sh depends on it.

revslaughter avatar Sep 27 '18 12:09 revslaughter

Thank you

palabadi avatar Mar 09 '19 21:03 palabadi