FROM node:slim AS app # referenced :- https://dev.to/cloudx/how-to-use-puppeteer-inside-a-docker-container-568c # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ENV CHROME_BIN=/usr/bin/google-chrome # Install Google Chrome Stable and fonts # Note: this installs the necessary libs to make the browser work with Puppeteer. RUN apt-get update && apt-get install curl gnupg -y \ && curl --location --silent 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 google-chrome-stable -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* COPY . /app WORKDIR /app RUN ls -lh RUN chmod 777 /app; EXPOSE 8080 RUN npm install CMD node index.js