Skip to content

Commit

Permalink
fix: faster Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Jan 7, 2021
1 parent c652708 commit b725f8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ RUN curl -s https://ipfs.io/ipfs/QmbukYcmtyU6ZEKt6fepnvrTNa9F6VqsUPMUgNxQjEmphH
RUN mkdir -p /home/node/app
WORKDIR /home/node/app

COPY . /home/node/app

RUN if [ ${USER_ID:-0} -ne 0 ] && [ ${GROUP_ID:-0} -ne 0 ]; then \
userdel -f node && \
if getent group node ; then groupdel node; fi && \
groupadd -g ${GROUP_ID} node && \
useradd -l -u ${USER_ID} -g node node && \
chown -fhR ${USER_ID}:${GROUP_ID} /home/node; fi

COPY --chown=${USER_ID}:${GROUP_ID} . /home/node/app

USER node

RUN npm run ci:install
Expand Down

0 comments on commit b725f8d

Please sign in to comment.