diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 1003b35..165d2e5 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /app # Dependencies COPY package.json package-lock.json* ./ -RUN npm ci +RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi # Source code COPY . . diff --git a/user-template-next/Dockerfile b/user-template-next/Dockerfile index 62ed91e..0678b79 100644 --- a/user-template-next/Dockerfile +++ b/user-template-next/Dockerfile @@ -4,7 +4,7 @@ FROM node:20-alpine AS builder WORKDIR /app COPY package.json package-lock.json* ./ -RUN npm ci +RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi COPY . . RUN npm run build