Home > Software design >  Exclude a command in docker
Exclude a command in docker

Time:05-09

I have the following ENTRYPOINT in my Dockerfile:

ENTRYPOINT["/setup.sh"]

I need to run a container without running setup.sh and run install.sh.
How do I do it?

CodePudding user response:

Just change your docker entrypoint when executing docker run :

docker run -d --rm --entrypoint  image_name WHATEVER_COMMAND_YOU_WANT

It will replace your dockerfile' entrypoint.

Not mandatory/related but i wanted to share with you this table that is quite useful to understand ENTRYPOINT AND/VS CMD enter image description here

  • Related