Skip to content

Commit

Permalink
Node Install & Puppeteer Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JamShady committed Sep 20, 2023
1 parent f985a5f commit c59013f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 8 additions & 4 deletions php-fpm/Dockerfile
Expand Up @@ -1338,12 +1338,16 @@ RUN if [ ${INSTALL_DNSUTILS} = true ]; then \
USER root

ARG INSTALL_PUPPETEER=false
ARG NODE_MAJOR=20

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 \
apt-get update && apt-get install -y ca-certificates curl gnupg \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update && apt-get install -y nodejs \
&& npm install --global puppeteer \
&& chmod -R o+rx ~/.cache/puppeteer \
;fi


Expand Down
11 changes: 4 additions & 7 deletions workspace/Dockerfile
Expand Up @@ -1863,17 +1863,14 @@ RUN if [ ${INSTALL_JDK} = true ]; then \
###########################################################################
# PUPPETEER:
###########################################################################
USER root
USER laradock

ARG INSTALL_PUPPETEER=false
# Assumes Node is installed

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 puppeteer \
&& chmod -R o+rx ~/.cache/puppeteer \
;fi

#
Expand Down

0 comments on commit c59013f

Please sign in to comment.