-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ LABEL org.opencontainers.image.authors="[email protected]" | |
LABEL org.opencontainers.image.licenses="MIT" | ||
LABEL org.opencontainers.image.version="8.3" | ||
|
||
# Need by pageres | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
ENV CHROMIUM_PATH /usr/bin/chromium | ||
|
||
# Fix hadolint #DL4006 (https://github.com/hadolint/hadolint/wiki/DL4006) | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
|
@@ -54,6 +58,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
bzip2 \ | ||
curl \ | ||
chromium \ | ||
ffmpeg \ | ||
git \ | ||
gnupg \ | ||
|
@@ -165,6 +170,7 @@ RUN fetchDeps=" \ | |
\ | ||
\ | ||
# ------------------------------------------------------------------ Big cleanup \ | ||
npm install -g pageres-cli && \ | ||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${fetchDeps}; \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* \ | ||
|
@@ -185,6 +191,11 @@ RUN sed -i 's#^;pm.status_path = .*#pm.status_path = /status#g' /usr/local/etc/p | |
# My configuration. | ||
COPY php.d /usr/local/etc/php/conf.d | ||
COPY etc /usr/local/etc/php | ||
|
||
# Patch | ||
COPY patch /tmp | ||
RUN cd /usr/local/lib/node_modules/pageres-cli && patch -p0 < /tmp/pageres.patch && rm -f /tmp/pageres.patch | ||
|
||
# Remove access log | ||
RUN sed -i 's#^access.log = /proc/self/fd/2#access.log = /dev/null#g' /usr/local/etc/php-fpm.d/docker.conf | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- cli.js 2024-09-20 11:47:51.746178276 +0200 | ||
+++ cli-new.js 2024-09-20 11:48:37.388920896 +0200 | ||
@@ -95,6 +95,11 @@ | ||
async function generate(arguments_, options) { | ||
const pageres = new Pageres({ | ||
incrementalName: !options.overwrite, | ||
+ launchOptions: { | ||
+ executablePath: process.env.CHROMIUM_PATH, | ||
+ args: ['--no-sandbox'], | ||
+ headless: 'new', | ||
+ } | ||
}) | ||
.destination(process.cwd()); |