For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/dockerfile-multiple-entrypoint-instructions-listed.md.
A documentation index is available at /llms.txt.
Dockerfiles must contain at most one ENTRYPOINT because only the last ENTRYPOINT instruction is applied and any earlier ENTRYPOINT instructions are silently ignored. Multiple ENTRYPOINT instructions can cause intended initialization, security wrappers, or startup controls to be bypassed, which may result in containers running unintended processes or reduced security protections.
This rule flags Dockerfiles that include more than one ENTRYPOINT instruction. Ensure the Dockerfile has a single ENTRYPOINT (for example, have the ENTRYPOINT invoke a wrapper script that performs initialization and then execs the main process). Resources with multiple ENTRYPOINT lines will be flagged.