| 
									
										
										
										
											2024-05-27 00:46:43 +02:00
										 |  |  | FROM node:20-slim
 | 
					
						
							| 
									
										
										
										
											2018-05-16 01:57:55 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | # See https://crbug.com/795759
 | 
					
						
							|  |  |  | RUN apt-get update && apt-get install -yq libgconf-2-4
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-27 00:46:43 +02:00
										 |  |  | # Install gnupg and ca-certificates required for adding the signing key
 | 
					
						
							|  |  |  | RUN apt-get update && apt-get install -y gnupg ca-certificates
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai, and a few others)
 | 
					
						
							|  |  |  | # Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer installs, work.
 | 
					
						
							|  |  |  | RUN apt-get update && apt-get install -y wget curl --no-install-recommends \
 | 
					
						
							|  |  |  |     && curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-linux-signing-key.gpg \
 | 
					
						
							|  |  |  |     && sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-linux-signing-key.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list' \
 | 
					
						
							|  |  |  |     && rm -f /etc/apt/sources.list.d/google-chrome-unstable.list \
 | 
					
						
							| 
									
										
										
										
											2018-05-16 01:57:55 +02:00
										 |  |  |     && apt-get update \
 | 
					
						
							| 
									
										
										
										
											2024-05-27 00:46:43 +02:00
										 |  |  |     && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
 | 
					
						
							| 
									
										
										
										
											2018-05-16 01:57:55 +02:00
										 |  |  |       --no-install-recommends \
 | 
					
						
							|  |  |  |     && rm -rf /var/lib/apt/lists/* \
 | 
					
						
							|  |  |  |     && apt-get purge --auto-remove -y curl \
 | 
					
						
							|  |  |  |     && rm -rf /src/*.deb
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-16 02:32:45 +02:00
										 |  |  | RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
 | 
					
						
							|  |  |  |     && apt-get update \
 | 
					
						
							|  |  |  |     && apt-get upgrade --no-install-recommends -y \
 | 
					
						
							|  |  |  |     && apt-get install -y -q --no-install-recommends \
 | 
					
						
							|  |  |  |         software-properties-common \
 | 
					
						
							|  |  |  |         apt-transport-https \
 | 
					
						
							|  |  |  |         build-essential \
 | 
					
						
							|  |  |  |         ca-certificates \
 | 
					
						
							|  |  |  |         curl \
 | 
					
						
							|  |  |  |         g++ \
 | 
					
						
							|  |  |  |         gcc \
 | 
					
						
							|  |  |  |         git \
 | 
					
						
							|  |  |  |         make \
 | 
					
						
							|  |  |  |         openssl \
 | 
					
						
							| 
									
										
										
										
											2024-05-27 00:46:43 +02:00
										 |  |  |         python-is-python3 \
 | 
					
						
							| 
									
										
										
										
											2018-05-16 02:32:45 +02:00
										 |  |  |         rsync \
 | 
					
						
							|  |  |  |         ssh \
 | 
					
						
							|  |  |  |         wget \
 | 
					
						
							| 
									
										
										
										
											2018-05-16 03:05:13 +02:00
										 |  |  |         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 \
 | 
					
						
							| 
									
										
										
										
											2018-05-16 02:32:45 +02:00
										 |  |  |     && apt-get clean \
 | 
					
						
							|  |  |  |     && rm -r /var/lib/apt/lists/*
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-16 01:57:55 +02:00
										 |  |  | # It's a good idea to use dumb-init to help prevent zombie chrome processes.
 | 
					
						
							|  |  |  | ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init
 | 
					
						
							|  |  |  | RUN chmod +x /usr/local/bin/dumb-init
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Uncomment to skip the chromium download when installing puppeteer. If you do,
 | 
					
						
							|  |  |  | # you'll need to launch puppeteer with:
 | 
					
						
							|  |  |  | #     browser.launch({executablePath: 'google-chrome-unstable'})
 | 
					
						
							|  |  |  | # ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-27 00:46:43 +02:00
										 |  |  | # Prepare pnpm
 | 
					
						
							|  |  |  | ENV PNPM_HOME="/root/.local/share/pnpm"
 | 
					
						
							|  |  |  | RUN mkdir -p ${PNPM_HOME}
 | 
					
						
							|  |  |  | ENV PATH="$PNPM_HOME:$PATH"
 | 
					
						
							| 
									
										
										
										
											2018-05-16 01:57:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-27 00:46:43 +02:00
										 |  |  | RUN bash -c "curl -fsSL https://get.pnpm.io/install.sh | bash - \
 | 
					
						
							|  |  |  |     && pnpm -v \
 | 
					
						
							|  |  |  |     && pnpm config set unsafe-perm true"
 | 
					
						
							| 
									
										
										
										
											2018-05-16 01:57:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-27 00:46:43 +02:00
										 |  |  | # Install puppeteer globally
 | 
					
						
							|  |  |  | RUN pnpm i -g puppeteer
 | 
					
						
							| 
									
										
										
										
											2018-05-16 01:57:55 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | ENTRYPOINT ["dumb-init", "--"]
 | 
					
						
							| 
									
										
										
										
											2024-05-27 00:46:43 +02:00
										 |  |  | CMD ["google-chrome-unstable"]
 |