diff --git a/dashboard/Dockerfile b/dashboard/Dockerfile index 3d1b852b6e2..b5450d08478 100644 --- a/dashboard/Dockerfile +++ b/dashboard/Dockerfile @@ -9,7 +9,10 @@ WORKDIR /app # Install dependencies based on the preferred package manager COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ RUN \ - if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ +if [ -f yarn.lock ]; then \ + corepack enable && corepack prepare yarn@4.9.2 --activate && \ + yarn config set nodeLinker node-modules && \ + yarn install --immutable; \ elif [ -f package-lock.json ]; then npm ci; \ elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ else echo "Lockfile not found." && exit 1; \ @@ -28,7 +31,11 @@ COPY . . # ENV NEXT_TELEMETRY_DISABLED 1 RUN \ - if [ -f yarn.lock ]; then yarn run build; \ + if [ -f yarn.lock ]; then \ + corepack enable && corepack prepare yarn@4.9.2 --activate && \ + yarn config set nodeLinker node-modules && \ + yarn install --immutable && \ + yarn run build; \ elif [ -f package-lock.json ]; then npm run build; \ elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ else echo "Lockfile not found." && exit 1; \