Need Assistance?

support@tutorialshub.in

Building Production Images

Non-Root Containers

ADVERTISEMENT
Docker Free Lesson
5 min read
ADVERTISEMENT

Running as an Unprivileged User

Applications generally do not need root privileges. Creating or selecting a dedicated user limits the damage possible if the application is compromised.

Ensure the application directories are owned by or writable to the chosen user before switching with USER.

ADVERTISEMENT