youhoc
Docker

icon picker
Dockerfile

img.jpg
img.jpg
ENTRYPOINT && CMD
to run / overwrite ENTRYPOINT, you need to have argument --entrypoint date
to run / overwrite CMD, you just need to enter command after image name
in conclusion, you should use them together
If both ENTRYPOINT and CMD are set, they combine into a single command on container start.
2 types of Docker
run & exit docker like CLI:
For CLI tools, use ENTRYPOINT to set the base executable, while CMD should provide default arguments.
CMD can be easily overridden at docker run without replacing the ENTRYPOINT.
start-up process docker (like webserver)
For pre-launch scripts, ENTRYPOINT should set the script, and CMD should set the final process.
ENTRYPOINT shell scripts should use exec “$@” to pass execution (PID 1) to the CMD.

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.