Dockerfile

This commit is contained in:
Håkon Størdal 2025-09-03 00:00:02 +02:00
parent b9bf66cbd8
commit 2a3026df76

View file

@ -7,8 +7,8 @@ WORKDIR /app
# Copy package.json and package-lock.json (if available)
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production && npm cache clean --force
# Install all dependencies (including devDependencies for building)
RUN npm ci && npm cache clean --force
# Copy the rest of the application code
COPY . .
@ -37,7 +37,6 @@ RUN npm ci --only=production && npm cache clean --force
# Copy the built application from the previous stage
COPY --from=base --chown=svelte:nodejs /app/build ./build
COPY --from=base --chown=svelte:nodejs /app/node_modules ./node_modules
COPY --from=base --chown=svelte:nodejs /app/package.json ./package.json
# Switch to the non-root user