Skip to content

Commit d26c406

Browse files
committed
chore: Change Docker config
1 parent 7c0ea24 commit d26c406

File tree

4 files changed

+33
-10
lines changed

4 files changed

+33
-10
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
!bin/
55
!dist/
66
!install-dependencies.sh
7+
!config

Dockerfile

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
FROM node:22-alpine
1+
FROM --platform=linux/amd64 node:22
22
RUN corepack enable && corepack prepare [email protected] --activate
3-
WORKDIR /usr/src/app
43

5-
ENV CHROME_BIN="/usr/bin/chromium-browser" \
6-
PUPPETEER_SKIP_DOWNLOAD="true"
7-
ADD install-dependencies.sh install-dependencies.sh
8-
RUN chmod 755 install-dependencies.sh && /bin/sh install-dependencies.sh
4+
# We don't need the standalone Chromium
5+
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
6+
ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium"
97

10-
RUN npm i -g [email protected] @mermaid-js/[email protected]
8+
# Install Google Chrome Stable and fonts
9+
# Note: this installs the necessary libs to make the browser work with Puppeteer.
10+
RUN apt-get update && apt-get install curl gnupg -y \
11+
&& curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
12+
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
13+
&& apt-get update \
14+
&& apt-get install google-chrome-stable -y --no-install-recommends \
15+
&& apt-get install chromium -y \
16+
&& rm -rf /var/lib/apt/lists/*
17+
18+
#ADD install-dependencies.sh install-dependencies.sh
19+
#RUN chmod 755 install-dependencies.sh && /bin/sh install-dependencies.sh
1120

21+
WORKDIR /usr/src/app
1222
COPY . .
1323

24+
RUN npm i -g [email protected] @mermaid-js/[email protected]
25+
#RUN npm install
26+
#RUN npx puppeteer browsers install chrome-headless-shell
27+
1428
ENTRYPOINT [ "node", "/usr/src/app/bin/markdown-confluence-sync-action.js"]

config/puppeteer-config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"args": ["--no-sandbox"]
3+
}

dist/index.js

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)