mirror of
https://github.com/hugomods/docker.git
synced 2025-04-27 21:52:17 +03:00
15 lines
407 B
Text
15 lines
407 B
Text
ARG USER=root
|
|
|
|
# delete the node user, separated into two RUN instructions avoid exiting with code 1.
|
|
RUN if id node >/dev/null 2>&1; then deluser node 2> /dev/null; fi
|
|
|
|
# delete the node group.
|
|
RUN if id node >/dev/null 2>&1; then delgroup node 2> /dev/null; fi
|
|
|
|
RUN addgroup -g 1000 hugo && adduser -u 1000 -G hugo -s /bin/sh -D hugo
|
|
|
|
RUN mkdir /src && chown -R hugo:hugo /src
|
|
|
|
USER ${USER}
|
|
|
|
WORKDIR /src
|