Docker

Docker

Made by DeepSource

Do not use sudo DOK-DL3004

Anti-pattern
Major

Do not use sudo as it leads to unpredictable behavior and possibly security vulnerabilities. Use a tool like gosu to perform user switching operations.

Bad Practice

FROM debian:buster
RUN sudo -u other_user some-command

Recommended

# Install gosu somehow
RUN gosu other_user:other_group some-command