From edb3a0576074ed816523c01fe8742a286ea3c2c4 Mon Sep 17 00:00:00 2001 From: walnuts1018 Date: Sun, 5 Nov 2023 16:58:05 +0900 Subject: [PATCH] fix --- front-prod.Dockerfile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/front-prod.Dockerfile b/front-prod.Dockerfile index 741dea0..22547fd 100644 --- a/front-prod.Dockerfile +++ b/front-prod.Dockerfile @@ -7,20 +7,19 @@ RUN apk add --no-cache libc6-compat WORKDIR /app # Install dependencies based on the preferred package manager -COPY front/package.json front/yarn.lock* front/package-lock.json* front/pnpm-lock.yaml* ./ +COPY front/package.json front/package-lock.json* ./ RUN \ - if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ - elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \ - else echo "Lockfile not found." && exit 1; \ - fi - + if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ + elif [ -f package-lock.json ]; then npm ci; \ + elif [ -f pnpm-lock.yaml ]; then yarn global add 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 . . +COPY ./front . # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry @@ -62,4 +61,4 @@ ENV PORT 3000 # set hostname to localhost ENV HOSTNAME "0.0.0.0" -CMD ["node", "server.js"] \ No newline at end of file +CMD ["node", "server.js"]