Add node group/user with gid/uid 1000 and a home directory.

This is a workaround for boot2docker issue 581, see
https://github.com/boot2docker/boot2docker/issues/581
This commit is contained in:
Sebastian Tschan 2016-11-15 16:02:51 +01:00
parent 9d7725cbaa
commit 3d8dc7666d
4 changed files with 7 additions and 5 deletions

View File

@ -3,8 +3,7 @@ FROM alpine:3.4
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 0.0.0
RUN addgroup -S node \
&& adduser -D -S -h /var/cache/node -s /sbin/nologin -G node node \
RUN adduser -D -u 1000 node \
&& apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \

View File

@ -1,6 +1,7 @@
FROM buildpack-deps:jessie-curl
RUN groupadd -r node && useradd -r -g node node
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
# gpg keys listed at https://github.com/nodejs/node
RUN set -ex \

View File

@ -1,6 +1,7 @@
FROM buildpack-deps:wheezy
RUN groupadd -r node && useradd -r -g node node
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
# gpg keys listed at https://github.com/nodejs/node
RUN set -ex \

View File

@ -1,6 +1,7 @@
FROM buildpack-deps:jessie
RUN groupadd -r node && useradd -r -g node node
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
# gpg keys listed at https://github.com/nodejs/node
RUN set -ex \