Skip to content

Commit

Permalink
fix: 🐛 playwright binary not found
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpetrov committed Oct 11, 2023
1 parent 43a41c2 commit 5b13fdc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
FROM ubuntu:focal as base
ARG SCOPE
ENV SCOPE=${SCOPE}
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
ENV PLAYWRIGHT_BROWSERS_PATH=/app/browsers
RUN set -uex; \
apt-get update; \
apt-get install -y ca-certificates curl gnupg; \
Expand Down Expand Up @@ -61,15 +63,14 @@ FROM base AS builder
# WORKDIR /app
# COPY --from=deps /app/node_modules ./node_modules
# COPY . .
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD 1
WORKDIR /app
COPY .gitignore .gitignore
COPY .npmrc ./
COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml

RUN pnpm install
RUN pnpx playwright install --with-deps chromium

RUN rm -rf node_modules/.pnpm/[email protected]

COPY --from=pruner /app/out/full/ .
Expand Down Expand Up @@ -114,11 +115,13 @@ RUN adduser --system --uid 1001 nextjs
# COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
# COPY --from=builder --chown=nextjs:nodejs /app/.next/server ./server
# COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

RUN npx [email protected] install --with-deps chromium
COPY --from=builder --chown=nextjs:nodejs /app/browsers ./browsers
COPY --from=builder /app/apps/${SCOPE}/public ./apps/${SCOPE}/public
COPY --from=builder --chown=nextjs:nodejs /app/apps/${SCOPE}/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/apps/${SCOPE}/.next/static ./apps/${SCOPE}/.next/static
COPY --from=builder --chown=nextjs:nodejs /app/apps/${SCOPE}/.next/server ./apps/${SCOPE}/.next/server

# # Prisma
# COPY ./packages/prisma ./packages/prisma
# COPY --from=builder /app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client ./node_modules/@prisma/client
Expand Down

1 comment on commit 5b13fdc

@vercel
Copy link

@vercel vercel bot commented on 5b13fdc Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.