From 63af2fbf9c9c787fafdceaa7ed595e5eacbe25de Mon Sep 17 00:00:00 2001 From: Anton Roslund Date: Wed, 6 Aug 2025 21:43:14 +0200 Subject: [PATCH] Update Dockerfile for way faster build --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index aefa181..251ba31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,16 @@ FROM node:lts-alpine -# add project files to /app -ADD ./ /app WORKDIR /app +# Copy only package files and install deps +# This layer will be cached as long as package*.json don't change +COPY package*.json package-lock.json* ./ +RUN npm ci + +# Copy the rest of your source +COPY . . + RUN apk add --no-cache openssl -# install node dependencies -RUN npm install EXPOSE 8080