diff --git a/Dockerfile b/Dockerfile index becf67aec..473c64691 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,6 @@ 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 && \ @@ -17,6 +15,8 @@ RUN if [ ${USER_ID:-0} -ne 0 ] && [ ${GROUP_ID:-0} -ne 0 ]; then \ 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