Skip to main content

DL4004: Multiple ENTRYPOINT instructions found

Error Reliability

Why This Matters

Only the last ENTRYPOINT instruction takes effect. Multiple ENTRYPOINT instructions in a stage are almost always a mistake because the earlier ones are silently ignored. This is more critical than a duplicate CMD because ENTRYPOINT defines how the container starts. A wrong entrypoint means the container runs unexpected code.

How to Fix

Remove duplicate ENTRYPOINT instructions, keep only the final one

Before (incorrect)

ENTRYPOINT ["python", "app.py"]
ENTRYPOINT ["node", "server.js"]

After (correct)

ENTRYPOINT ["node", "server.js"]

Rule Details

Rule Code
DL4004
Severity
Error
Category
Reliability

Related Rules