I create the image “FOO” from a Dockerfile that contains an ENTRYPOINT.
Is it possible to run this image in order that the entry point is executed (no override), and then the extra commands from the command line ?
Let’s be more clear :
Here is my dockerfile
FROM ubuntu
RUN blah blah
ENTRYPOINT ["myscript.sh"]
Then, I create an image with docker build -t FOO .
Now, if I run docker run --rm -it FOO
it works well: myscript.sh is well launched.
But, if I run docker run --rm -it FOO bash
it says “Extra argument bash.“.
On the other hand, if I create the image without the ENTRYPOINT in the dockerfile, then the second command (with bash) actually launches bash (but of course not myscript.sh).
Is it possible to get the best of the both ?
Execute the ENTRY POINT and then, if any, what is at the end of the docker run command line ?
Thanx!