Skip to content

Commit 26ba110

Browse files
authored
Update BestPractices.md with alpine user
Added entry to **Non-root User** section to show adding user & group in the alpine variant since the commands are a little different.
1 parent f7fc1e0 commit 26ba110

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/BestPractices.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ FROM node:4.1.2-onbuild
2323
RUN groupadd -r node && useradd -r -g node node
2424
```
2525

26+
When using the `alpine` variant, add the user like so:
27+
28+
```Dockerfile
29+
FROM node:7.3.0-alpine
30+
RUN addgroup -S app && adduser -S -g app app
31+
```
32+
2633
## Memory
2734

2835
By default, any Docker Container may consume as much of the hardware such as CPU and RAM. If you are running multiple containers on the same host you should limit how much memory they can consume.

0 commit comments

Comments
 (0)