-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile.base
30 lines (25 loc) · 1.27 KB
/
Dockerfile.base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:lts-slim
LABEL repository="https://github.com/jakejarvis/chrome-headless-docker"
LABEL homepage="https://jarv.is/"
LABEL maintainer="Jake Jarvis <[email protected]>"
ARG DEBIAN_FRONTEND=noninteractive
# Install and upgrade required utilities (jq & bc required by Lighthouse Action)
RUN apt-get update -qqy && \
apt-get install -qqy --no-install-recommends gnupg2 wget ca-certificates apt-transport-https jq bc && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# Install latest Chrome stable
RUN 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-chrome.list' && \
apt-get update -qqy && \
apt-get install -qqy --no-install-recommends google-chrome-stable && \
rm /etc/apt/sources.list.d/google-chrome.list && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# Start Chrome in headless/debugging mode by default
ENTRYPOINT ["/usr/bin/google-chrome-stable", \
"--headless", \
"--no-sandbox", \
"--no-zygote", \
"--disable-gpu", \
"--disable-dev-shm-usage", \
"--remote-debugging-address=0.0.0.0", \
"--remote-debugging-port=9222"]