You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
José Lorenzo Rodríguez edited this page Jun 18, 2018
·
3 revisions
Last user should not be root.
Problematic code:
FROM busybox
USER root
RUN ...
Correct code:
FROM busybox
USER root
RUN ...
USER guest
Rationale:
Switching to the root USER opens up certain security risks if an attacker gets access to the container. In order to mitigate this, switch back to a non privileged user after running the commands you need as root.