Dockerfile
This commit is contained in:
parent
b9bf66cbd8
commit
2a3026df76
1 changed files with 2 additions and 3 deletions
|
|
@ -7,8 +7,8 @@ WORKDIR /app
|
||||||
# Copy package.json and package-lock.json (if available)
|
# Copy package.json and package-lock.json (if available)
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install all dependencies (including devDependencies for building)
|
||||||
RUN npm ci --only=production && npm cache clean --force
|
RUN npm ci && npm cache clean --force
|
||||||
|
|
||||||
# Copy the rest of the application code
|
# Copy the rest of the application code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
@ -37,7 +37,6 @@ RUN npm ci --only=production && npm cache clean --force
|
||||||
|
|
||||||
# Copy the built application from the previous stage
|
# Copy the built application from the previous stage
|
||||||
COPY --from=base --chown=svelte:nodejs /app/build ./build
|
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
|
COPY --from=base --chown=svelte:nodejs /app/package.json ./package.json
|
||||||
|
|
||||||
# Switch to the non-root user
|
# Switch to the non-root user
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue