Merge pull request #385 from styfle/patch-4

Update BestPractices.md to remove alpine user
This commit is contained in:
Christopher Horrell 2017-04-20 09:41:14 -04:00 committed by GitHub
commit 5e80a80771
1 changed files with 2 additions and 7 deletions

View File

@ -30,13 +30,8 @@ When using the `onbuild` variant, add the user like so:
FROM node:4.1.2-onbuild
# Add our user and group first to make sure their IDs get assigned consistently
RUN groupadd -r node && useradd -r -g node node
```
When using the `alpine` variant, add the user like so:
```Dockerfile
FROM node:7.3.0-alpine
RUN addgroup -S node && adduser -S -g node node
# Set the user to use when running this image
USER node
```
## Memory