Description
#573 added an ENTRYPOINT
which invokes command
:
docker-gen/app/docker-entrypoint.sh
Line 6 in 1714302
Based on the comments I could follow in the PR(s), it seems like the purpose was to distinguish between executable and non-executable arguments from COMMAND
. A problem, I believe, is that the -v
flag is a little too liberal in checking what is "executable", and that causes invoking this Docker image to fail on reasonable input.
Consider the following REPL:
$ docker run -it --rm -v /var/run/docker.sock:/tmp/docker.sock:ro --entrypoint ash nginxproxy/docker-gen
$ echo Hello world > template.tmpl
$ docker-gen /template.tmpl
Hello world
$ /app/docker-entrypoint.sh /template.tmpl
/app/docker-entrypoint.sh: exec: line 8: /template.tmpl: Permission denied
Invoking docker-gen
with just a template works, but going through the ENTRYPOINT
script fails. IMO the Docker image ought to be able to be called in this manner.
This logic can be avoided by passing even a single argument to the ENTRYPOINT
script:
$ /app/docker-entrypoint.sh -watch /template.tmpl
Hello world
2024/05/28 07:33:17 Watching docker events
Hello world
But that's just masking what I believe to be incorrect underlying logic. Thanks for considering the issue.