Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
chore: updated Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
AH-dark committed Jan 13, 2024
1 parent d1eeced commit b10ac16
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
FROM node:lts AS deps
FROM node:lts-slim AS base

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

FROM base AS deps
WORKDIR ~/app

# Install dependencies
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile

FROM node:lts AS builder
FROM base AS builder
WORKDIR ~/app

# Copy dependencies
COPY --from=deps ~/app/node_modules ./node_modules
COPY . .

# Build
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
RUN pnpm run build

FROM nginx:stable-alpine AS runner
Expand Down

0 comments on commit b10ac16

Please sign in to comment.