This repository was archived by the owner on Jul 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 1.39 KB
/
Copy pathDockerfile
File metadata and controls
36 lines (28 loc) · 1.39 KB
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
31
32
33
34
35
36
FROM ubuntu:16.04
LABEL version "1.1"
LABEL description "Headless unstable Google chrome."
ENV APT_PACKAGES wget curl unzip apt-transport-https ca-certificates
ENV CHROME_USER chrome
RUN mkdir -p /home/${CHROME_USER} && \
groupadd --system ${CHROME_USER} && \
useradd --system --gid ${CHROME_USER} ${CHROME_USER} && \
chown -R ${CHROME_USER}:${CHROME_USER} /home/${CHROME_USER}
ADD get_fonts.sh /opt/get_fonts.sh
RUN apt-get update && \
apt-get install --yes ${APT_PACKAGES} && \
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
echo ttf-mscorefonts-installer msttcorefonts/dldir select /root/ms-fonts/ | debconf-set-selections && \
bash /opt/get_fonts.sh && \
apt-get install --yes ttf-mscorefonts-installer && \
curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome-unstable.list && \
apt-get update && \
apt-get install --yes --no-install-recommends google-chrome-unstable && \
rm -rf /var/lib/apt/lists/*
USER ${CHROME_USER}
WORKDIR /home/${CHROME_USER}
EXPOSE 9222
ENTRYPOINT [ "google-chrome-unstable", \
"--headless", "--disable-gpu", \
"--remote-debugging-address=0.0.0.0", \
"--remote-debugging-port=9222" ]