0

Update apps/api/Dockerfile
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled

This commit is contained in:
Nikolai X. Shadeuxs 2024-06-19 04:28:13 -04:00
parent 47f268ed07
commit 650fb019c2

View File

@ -6,18 +6,19 @@ RUN corepack enable
WORKDIR /app
# Copy only the package files first
COPY package.json pnpm-lock.yaml ./
COPY apps/api/package.json apps/api/pnpm-lock.yaml ./
FROM base AS prod-deps
RUN pnpm install --prod --frozen-lockfile
FROM base AS build
COPY package.json pnpm-lock.yaml ./
COPY apps/api/package.json apps/api/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
COPY apps/api .
RUN pnpm run build
FROM base
FROM node:20-slim
WORKDIR /app
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y chromium chromium-sandbox && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives