Skip to content

Commit

Permalink
Puppeteer: Tweaks for v19 which installs Chrome in ~/.cache/puppeteer…
Browse files Browse the repository at this point in the history
…/chrome
  • Loading branch information
JamShady committed Dec 7, 2022
1 parent 03f70db commit 801e52a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 2 additions & 3 deletions php-fpm/Dockerfile
Expand Up @@ -1278,15 +1278,14 @@ RUN if [ ${INSTALL_DNSUTILS} = true ]; then \
###########################################################################
# PUPPETEER:
###########################################################################
USER root

ARG INSTALL_PUPPETEER=false

RUN if [ ${INSTALL_PUPPETEER} = true ]; then \
curl -sL https://deb.nodesource.com/setup_current.x | bash \
&& apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm-dev libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 xdg-utils wget \
&& npm install --global --unsafe-perm puppeteer@v18 \
&& chmod -R o+rx /usr/lib/node_modules/puppeteer/node_modules/puppeteer-core/.local-chromium \
&& npm install --global --unsafe-perm --allow-root puppeteer \
&& chmod -R o+rx ~/.cache/puppeteer \
;fi


Expand Down
10 changes: 3 additions & 7 deletions workspace/Dockerfile
Expand Up @@ -1782,17 +1782,13 @@ RUN if [ ${INSTALL_DNSUTILS} = true ]; then \
###########################################################################
# PUPPETEER:
###########################################################################
USER root
USER laradock

ARG INSTALL_PUPPETEER=false

RUN if [ ${INSTALL_PUPPETEER} = true ]; then \
apt-get update \
&& apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget \
&& npm install --global --unsafe-perm puppeteer@v18 \
&& find $NVM_DIR -type f -name node -exec ln -s {} /usr/local/bin/node \; \
&& NODE_MODS_DIR="$NVM_DIR/versions/node/$(node -v)/lib/node_modules" \
&& chmod -R o+rx $NODE_MODS_DIR/puppeteer/node_modules/puppeteer-core/.local-chromium \
npm install --global --unsafe-perm --allow-root puppeteer \
&& chmod -R o+rx ~/.cache/puppeteer \
;fi

#
Expand Down

0 comments on commit 801e52a

Please sign in to comment.