docker run --name="test-app" --entrypoint="/bin/bash" example-app
This command will override the ENTRYPOINT directive of the example-app image when the container test-app is created. The CMD directive of the image will remain unchanged unless otherwise specified:
docker run --name="test-app" --entrypoint="/bin/bash" example-app /app/test.sh
In the above example, both the ENTRYPOINT and the CMD of the image have been overridden. This container process becomes /bin/bash /app/test.sh.