Skip to content

hadolint/DL3004

Do not use sudo.

Property Value
Severity Error
Category Security
Default Enabled

Description

Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root.

Examples

Problematic code

FROM busybox
RUN sudo apt-get install

Correct code

FROM busybox
RUN apt-get install

Reference