addnab / docker-run-action

MIT License
209 stars 93 forks source link

Passing args to ENTRYPOINT script #27

Open oleks-popovych opened 3 years ago

oleks-popovych commented 3 years ago

So I'd like to know is there is a way, to pass arguments to entrypoint script inside docker image?

My usecase.

I have my Dockerfile ending line this

...
ENTRYPOINT ["/bin/bash", "entrypoint.sh"]

entrypoint.sh - takes several arguments to make its work.

I've expected that somehow I could pass script's arguments as I would do in conventional docker container run

docker container run [OPTIONS] IMAGE [COMMAND] [ARG...]
docker container run -v ... my_image:latest --script_args1=value1

But it seems it is impossible?