diff --git a/Dockerfile b/Dockerfile index a987101..be5d36c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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