25 lines
1.0 KiB
Docker
25 lines
1.0 KiB
Docker
# Based on https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
|
|
|
|
# Base image
|
|
FROM node:15-slim
|
|
|
|
# Install latest chrome dev package and fonts to support major charsets
|
|
RUN apt-get update \
|
|
&& apt-get install -y wget gnupg ca-certificates libgconf-2-4 \
|
|
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
|
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
|
|
&& apt-get update \
|
|
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
|
|
--no-install-recommends \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Uncomment to skip the chromium download when installing puppeteer
|
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
|
ENV PUPPETEER_BROWSER_PATH "google-chrome-stable"
|
|
|
|
# Copy action
|
|
COPY action/dist/index.js /index.js
|
|
RUN chmod +x /index.js
|
|
|
|
# Execute action
|
|
ENTRYPOINT node /index.js |