Open duncdrum opened 5 years ago
The problem is how the args are being passed to the command line. I am 99% sure this is a Docker issue.
very likely i just don't see whats wrong with the commands, reported in the final line, they seem correct to me. If you e.g. JSON escape the RUN
you get:
OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"-l\": executable file not found in $PATH": unknown
ok after some more digging around i think this is on distroless and not on docker
@duncdrum tried you workaround like this:
FROM existdb/existdb:4.6.1
ARG ADMINPW
RUN ["java", "-jar", "start.jar", "client", "--no-gui", "-l", "-u", "admin", "-P", "", "-x", "sm:passwd('admin','$ADMINPW')"]
building succeeds, but exist will not start any more, but instead continuously reboots, no errors, no logging. Any ideas?
docker run works, docker-compose up works, stack deploy doesn't.
@Duncan Paterson duncan@exist-db.org
A couple of things. This is my understanding ...
If you check, the travis tests, the above criteria are met
On Sun, 20 Jan 2019 at 01:17, Duncan Paterson notifications@github.com wrote:
very likely i just don't see whats wrong with the commands, reported in the final line, they seem correct to me.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/52#issuecomment-455775487, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrSYJntY3OuwBu5itlIYOy3DyB1fZTuks5vEwzHgaJpZM4aJG2w .
-- Take Care Grant Mackenzie
@grantmacken
the problem is related to different syntax variants of the RUN command, the -l
flag by itself is working as expected. I just don't see the method behind why some commands (with or without flags) work, and others don't. If it is A DNS issue i would expect none of the commands to work.
All work in the full JSON form, which is good enough, i d just like to understand why not all commands work in both syntax variants. JAC provides a shell that SHELL
recognises.
My understanding is the client is just an RPC client. It connects to local or remote existdb instances using the RPC protocol. If you are trying to use the client at the build phase and using the l flag what is the client connecting to.
RUN ["java", "-jar", "start.jar", "client",.....
will start exist, run the client command to it and shutdown exist.
@grantmacken the intermediate image created for the layer corresponding to the RUN
command calling it?
So while doing the readme updates i played some more with the
SHELL
directive for docker files. The good news first:This works, and produces:
all good. By the same token this works as expected as well:
So, i would expect the following to also work:
Yet, it produces (shortened for readability):
so far so good, however:
So the client is responding just not how I expect it to. I have tried different iterations of json escaping the
RUN
command and reshuffle the split betweenSHELL
andRUN
, e.g. only go up to-jar
inSHELL
and execute the rest fromRUN
but no joy.I guess one could address
exist.jar
directly and use the-Dorg.exist.db…
syntax here as well, but imv the above example should work, or am i missing something. Given that the JAC "dumb shell" is coming up and executing-l
there should be away to, e.g. also domkcol hamlet
or what not.It possible that this is a string escaping problem with docker, but its also possible that our JAC shell is still not 100% any input welcome, i m kind of stuck why the last example doesn't work but the others do.
The workaround is to simply not use
SHELL
and stick to long json escapedRUN
commands, ie.: