From ed68e976859d9857adf01e6724a4bf866a492c11 Mon Sep 17 00:00:00 2001 From: Yeolyi Date: Sat, 10 Feb 2024 23:34:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20yarn=EC=97=90=20=EB=A7=9E=EA=B2=8C=20doc?= =?UTF-8?q?kerfile=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 410b22fec..8864e7dea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,25 +7,28 @@ RUN apk add --no-cache libc6-compat 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; \ - 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; \ - fi +# COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ +# RUN \ +# if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ +# 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; \ +# fi # Rebuild the source code only when needed FROM base AS builder WORKDIR /app -COPY --from=deps /app/node_modules ./node_modules +# COPY --from=deps /app/node_modules ./node_modules COPY . . +# https://velog.io/@biud436/Nest.js에-Yarn-PnP-Zero-Install-Docker-적용#dockerfile +RUN yarn install + # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. -# ENV NEXT_TELEMETRY_DISABLED 1 +ENV NEXT_TELEMETRY_DISABLED 1 RUN \ if [ -f yarn.lock ]; then yarn run build; \