← All notes

Docker ENTRYPOINT and docker run --entrypoint

Answer: ENTRYPOINT sets the executable a container should run as. It has two possible forms: exec form (preferred) and shell form. docker run --entrypoint overwrites the default entrypoint set by the image.

Examples

FROM python:3.13-slim
ENTRYPOINT ["python"]
CMD ["app.py"]
docker run --entrypoint python myapp -c "print(1)"

Rules

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker docs, Dockerfile reference; Docker docs, Running containers. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker docs, Dockerfile reference; Docker docs, Running containers. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.

Cite this

Permanent ID: iil:note:vfd6br5b

iinventedlight. 2026. "Docker ENTRYPOINT and docker run --entrypoint." iinventedlight Library, iil:note:vfd6br5b, version of 2026-11-18. https://iinventedlight.com/library/notes/docker-entrypoint/. License: CC-BY-4.0.

@misc{iil_note_vfd6br5b,
  author = {{iinventedlight}},
  title = {{Docker ENTRYPOINT and docker run --entrypoint}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/docker-entrypoint/},
  note = {Permanent ID iil:note:vfd6br5b. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-entrypoint.md.