Dockerfile
# -- compilation --FROM node:22.14.0-alpine as buildWORKDIR /usr/src/app # install dependenciesCOPY package*.json ./RUN npm ci # copy in app code and build itCOPY . .RUN npm run build # -- execution --FROM node:22.14.0-alpineWORKDIR /usr/src/app RUN apk add --no-cache tini # install production dependenciesCOPY package*.json ./RUN npm ci --omit=dev \ && npm cache clean --force # add the already compiled codeCOPY --from=build /usr/src/app/dist dist # we listen on :8080 by defaultEXPOSE 8080 # use tini as init process since Node.js isn't designed to be run as PID 1ENTRYPOINT ["/sbin/tini", "--"]CMD ["node", "--enable-source-maps", "--disable-proto=delete", "dist/server.js"]