diff --git a/Dockerfile b/Dockerfile index f9449ff..ebeb75f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,8 @@ # syntax=docker/dockerfile:1 -#FROM node:latest +# cacheble npm install stage that only reruns if package.json actually changes. FROM node:22 AS builder -#build tools for alpine -# RUN apk --no-cache add python3 -# RUN apk --no-cache add make -# RUN apk --no-cache add gcc -# RUN apk --no-cache add musl-dev -# RUN apk --no-cache add g++ - ENV NODE_ENV=production WORKDIR /app @@ -17,7 +10,7 @@ WORKDIR /app COPY ["package.json", "package-lock.json*", "./"] -RUN NODE_ENV=development npm install +RUN NODE_ENV=production npm install COPY . .