Skip to content

Commit 60d0add

Browse files
authored
Merge pull request #299 from styfle/patch-2
Update BestPractices.md with alpine user
2 parents f7fc1e0 + 7183790 commit 60d0add

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 node && adduser -S -g node node
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)