Skip to content

Commit

Permalink
build(docker): update Dockerfiles to use pnpm build_image
Browse files Browse the repository at this point in the history
  • Loading branch information
brucetony committed Sep 4, 2024
1 parent cd6a92b commit 5c8e23f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM node:20-alpine AS base
LABEL maintainer="[email protected]"

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

WORKDIR /app

COPY yarn.lock package.json ./
COPY pnpm-lock.yaml package.json ./

RUN yarn install
RUN pnpm install

COPY . .

Expand Down
10 changes: 7 additions & 3 deletions prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
FROM node:20-alpine AS builder
LABEL maintainer="[email protected]"

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

WORKDIR /app

COPY yarn.lock package.json ./
COPY pnpm-lock.yaml package.json ./

RUN yarn install
RUN pnpm install

COPY . .

RUN yarn build
RUN pnpm build

FROM node:20-alpine AS production

Expand Down

0 comments on commit 5c8e23f

Please sign in to comment.