diff --git a/Dockerfile.frontend b/Dockerfile.frontend index 6e128aa..2571695 100644 --- a/Dockerfile.frontend +++ b/Dockerfile.frontend @@ -9,7 +9,7 @@ COPY frontend/package*.json ./ COPY frontend/yarn.lock* frontend/pnpm-lock.yaml* ./ # Install dependencies -RUN if [ -f yarn.lock ]; then yarn install; \ +RUN if [ -f yarn.lock ]; then corepack enable && corepack yarn install; \ elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm install; \ else npm install; fi @@ -23,7 +23,7 @@ CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"] # Production build stage FROM base AS build -RUN if [ -f yarn.lock ]; then yarn build; \ +RUN if [ -f yarn.lock ]; then corepack yarn build; \ elif [ -f pnpm-lock.yaml ]; then pnpm build; \ else npm run build; fi