Skip to content

Commit

Permalink
build(dockerfile): migrate to pnpm from yarn in docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallenbagel committed Jun 23, 2024
1 parent a58811e commit 182aeaa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ RUN \
'linux/arm64' | 'linux/arm/v7') \
apk update && \
apk add --no-cache python3 make g++ gcc libc6-compat bash && \
yarn global add node-gyp \
npm install -g pnpm \
;; \
esac

COPY package.json yarn.lock ./
RUN CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile --network-timeout 1000000
COPY package.json pnpm-lock.lock ./
RUN CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile --network-timeout 1000000

COPY . ./

ARG COMMIT_TAG
ENV COMMIT_TAG=${COMMIT_TAG}

RUN yarn build
RUN pnpm build

# remove development dependencies
RUN yarn install --production --ignore-scripts --prefer-offline
RUN pnpm prune --prod

RUN rm -rf src server .next/cache

Expand All @@ -47,6 +47,6 @@ RUN apk add --no-cache tzdata tini && rm -rf /tmp/*
COPY --from=BUILD_IMAGE /app ./

ENTRYPOINT [ "/sbin/tini", "--" ]
CMD [ "yarn", "start" ]
CMD [ "pnpm", "start" ]

EXPOSE 5055

0 comments on commit 182aeaa

Please sign in to comment.