My Dockerfile contains a
RUN xyz.sh --IP localhost
docker run -it IP 127.0.0.1 name:tag
RUN instructions happen at build time.
CMD instructions happen at run time.
You probably want something like this in your Dockerfile:
.... ENTRYPOINT ["xyz.sh"] CMD ["--IP", "127.0.0.1"] ....
Then you can run with:
docker run -it some-image --IP 127.0.0.1
Arguments after the image overwrite the
CMD instruction so then it runs the
ENTRYPOINT instruction followed by your arguments.