Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ RUN --mount=type=cache,target=/root/.npm,sharing=locked,id=npm-cache \
# the duration of the install, so the published image keeps the default archive host.
sed -i "s|deb.debian.org|${DEBIAN_MIRROR_HOST}|g" /etc/apt/sources.list.d/debian.sources && \
npx -y playwright-core install-deps chromium && \
# tini reaps orphaned browser processes that would otherwise become zombies under node as PID 1.
apt-get install -y --no-install-recommends tini && \
rm -rf /var/lib/apt/lists/* && \
sed -i "s|${DEBIAN_MIRROR_HOST}|deb.debian.org|g" /etc/apt/sources.list.d/debian.sources

# ------------------------------
Expand Down Expand Up @@ -74,4 +77,4 @@ COPY --chown=${USERNAME}:${USERNAME} cli.js package.json ./
WORKDIR /home/${USERNAME}

# Run in headless and only with chromium (other browsers need more dependencies not included in this image)
ENTRYPOINT ["node", "/app/cli.js", "--headless", "--browser", "chromium", "--no-sandbox"]
ENTRYPOINT ["/usr/bin/tini", "-s", "--", "node", "/app/cli.js", "--headless", "--browser", "chromium", "--no-sandbox"]