Multiple ENTRYPOINT instructions

ID

multiple_entrypoint

Severity

info

Family

Container Security

Tags

dockerfile, flaw, non-reachable

Description

There can only be one ENTRYPOINT instruction in a Dockerfile. Only the last ENTRYPOINT will take effect.

Reference: ENTRYPOINT command.

Security

N/A

Examples

FROM golang:1.7.3

ENTRYPOINT  [ "/opt/app/run.sh", "--port", "8000" ]

# issue
ENTRYPOINT  [ "/opt/app/run.sh", "--port", "8001" ]

Mitigation / Fix

Remove unnecessary ENTRYPOINT instructions.