Dockerfile instructions

Dockerfile ENTRYPOINT

Sets the default executable. For the exec-form pairing with CMD, runtime arguments replace CMD and append to ENTRYPOINT. Shell form differs. --entrypoint can override it; it is not a security boundary. Explicit runtime entrypoint override clears the image default CMD arguments.

Formal Syntax & Structure

docker syntaxdocker
ENTRYPOINT ["executable", "arg", ...] | ENTRYPOINT <command>

Parameters & Attributes

NameTypeDescription
executablestringDefault executable.
argstringFixed argument.

Working Example

Example Snippetdocker
FROM busybox:1.37ENTRYPOINT ["echo", "Color:"]CMD ["blue"]
Docker Reference