From 5994f3b82e46774423fae9f42e545366602f6fcb Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 30 Jul 2021 17:07:46 -0600 Subject: [PATCH] perf(dockerfile): moved copy file order - moved node file copy order, allow for package.json usage - invocation js moved after node install, faster builds --- build/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index 26dda96..4bfc5f4 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -56,11 +56,12 @@ ENV CERT_HOSTNAME="" # install node-livereload and express as node user then switch back to root user USER node WORKDIR /home/node -COPY --chown=node:node [ "package.json", "package-lock.json", "ab-livereload.js", "/home/node/"] +COPY --chown=node:node [ "package.json", "package-lock.json", "/home/node/" ] RUN mkdir -p .npm-global/bin .npm-global/lib \ && npm config set fund false \ && npm config set update-notifier false \ && npm install --save +COPY --chown=node:node [ "ab-livereload.js", "/home/node/"] # copy scripts and fix-up all permissions USER root