Tuesday, 1 September 2026

docker entrypoint cmd

 entrypoint is in DockerFile of an image is what docker exec on start

CMD without entrypoint specified is same thing, docker exec CMD


if entrypoint and CMD both present, doccker exec entry point and treat CMD as input parameter to entrypoint



!!!!!!!!!!

ENTRYPOINT ["/bin/bash"] → yes, execve("/bin/bash"), bash is PID 1 ✓ (your intuition)

ENTRYPOINT ["/edge"] → execve("/edge"), the Go binary is PID 1 ✓

But it's never . — sourcing is a shell-only operation on shell-syntax files; 

Docker always execs, replacing the freshly cloned process's image with your program.

No comments:

Post a Comment