Skip to content

Commit

Permalink
Update Production Dockerfile to replace yarn commands with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivam Naik committed Apr 13, 2024
1 parent ed1023c commit e181524
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker/prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
#COPY package.json yarn.lock ./
#RUN yarn install --frozen-lockfile

# If using npm with a `package-lock.json` comment out above and use below instead
# COPY package.json package-lock.json ./
# RUN npm ci
COPY package.json package-lock.json ./
RUN npm ci

# Rebuild the source code only when needed
FROM node:16-alpine AS builder
Expand All @@ -21,10 +21,10 @@ COPY . .
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN yarn build
#RUN yarn build

# If using npm comment out above and use below instead
# RUN npm run build
RUN npm run build

# Production image, copy all the files and run next
FROM node:16-alpine AS runner
Expand Down

0 comments on commit e181524

Please sign in to comment.