Fix Dockerfiler

This commit is contained in:
Anton Roslund 2025-09-28 20:23:18 +02:00
parent 7d63cac3b9
commit 9eae1d21b6

View file

@ -1,24 +1,15 @@
FROM node:lts-alpine AS build FROM node:lts-alpine
WORKDIR /app WORKDIR /app
RUN apk add --no-cache openssl
# Copy only package files and install deps # Copy only package files and install deps
# This layer will be cached as long as package*.json don't change # This layer will be cached as long as package*.json don't change
COPY package*.json package-lock.json* ./ COPY package*.json package-lock.json* ./
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev RUN npm ci
# Copy the rest of your source # Copy the rest of the source
COPY . . COPY . .
FROM node:lts-alpine
RUN apk add --no-cache openssl
USER node:node
WORKDIR /app
COPY --from=build /app .
EXPOSE 8080 EXPOSE 8080