Skip to content

Commit 19ad5a1

Browse files
committed
test(CRC-184): Install chromium and pupetter dependencies
1 parent 87271e5 commit 19ad5a1

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

Dockerfile

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
1+
# cspell: disable
2+
13
FROM node:22-alpine AS installer
4+
# Install necessary dependencies for Puppeteer and Chromium
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
fonts-liberation \
7+
libasound2 \
8+
libatk-bridge2.0-0 \
9+
libatk1.0-0 \
10+
libcups2 \
11+
libdrm2 \
12+
libgbm1 \
13+
libgtk-3-0 \
14+
libnspr4 \
15+
libnss3 \
16+
libx11-xcb1 \
17+
libxcomposite1 \
18+
libxdamage1 \
19+
libxrandr2 \
20+
xdg-utils \
21+
libu2f-udev \
22+
libxshmfence1 \
23+
libglu1-mesa \
24+
chromium \
25+
&& apt-get clean \
26+
&& rm -rf /var/lib/apt/lists/*
227
RUN corepack enable && corepack prepare [email protected] --activate
328
WORKDIR /usr/src/app
429
COPY package.json pnpm-lock.yaml ./
530
RUN pnpm install --frozen-lockfile --no-optional
6-
COPY . .
731

8-
FROM node:22-alpine
9-
WORKDIR /usr/src/app
10-
COPY --from=installer /usr/src/app ./
32+
# Puppeteer setup: Skip Chromium download and use the installed Chromium
33+
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
34+
ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium"
35+
1136
ENTRYPOINT [ "node", "/usr/src/app/bin/markdown-confluence-sync-action.js"]

0 commit comments

Comments
 (0)