Skip to content

Commit 1a79d58

Browse files
authored
Merge pull request #1628 from jmealo/docs/best-pratices
docs: Update BestPractices.md: Clarify why running as root is bad mmmmkay
2 parents cb93068 + 1c1c000 commit 1a79d58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/BestPractices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ You can also include Tini [directly in your Dockerfile](https://github.com/krall
9797

9898
## Non-root User
9999

100-
By default, Docker runs container as root which inside of the container can pose as a security issue. You would want to run the container as an unprivileged user wherever possible. The node images provide the `node` user for such purpose. The Docker Image can then be run with the `node` user in the following way:
100+
By default, Docker runs commands inside the container as root which violates the [Principle of Least Privilege (PoLP)](https://en.wikipedia.org/wiki/Principle_of_least_privilege) when superuser permissions are not strictly required. You want to run the container as an unprivileged user whenever possible. The node images provide the `node` user for such purpose. The Docker Image can then be run with the `node` user in the following way:
101101

102102
```
103103
-u "node"

0 commit comments

Comments
 (0)