Pattern: Use of sudo
Issue: -
Avoid installing or using sudo
since it has unpredictable TTY and signal-forwarding behavior that can cause problems. If you absolutely need functionality similar to sudo
, such as initializing the daemon as root but running it as non-root), consider using gosu
.
Example of incorrect code:
RUN sudo apt-get install
Example of correct code:
RUN apt-get install