This repository was archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (43 loc) · 1.32 KB
/
Dockerfile
File metadata and controls
53 lines (43 loc) · 1.32 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Base image
FROM amd64/ubuntu:latest
# Update & upgrade system
RUN apt-get update && \
apt-get upgrade -yq
# Define image locale & timezone
ENV TZ=Universal
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install required packages
RUN apt-get install -yq wget ca-certificates gnupg
# Install Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install -yq google-chrome-stable
# Install international fonts
RUN apt-get install -yq --no-install-recommends \
fontconfig \
fonts-arphic-ukai \
fonts-arphic-uming \
fonts-ipafont-mincho \
fonts-unfonts-core \
fonts-ipafont-gothic \
fonts-wqy-zenhei \
fonts-thai-tlwg \
fonts-kacst \
fonts-symbola \
fonts-noto \
fonts-freefont-ttf
# Installation cleanup
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Create directories
RUN mkdir /data && \
mkdir /profile
WORKDIR /data
# Add chrome user
RUN addgroup chrome && \
useradd -m -g chrome chrome
USER chrome
# Expose Chrome remote debugging port
EXPOSE 9222
ENTRYPOINT ["google-chrome", "--headless", "--disable-gpu", "--profile-directory=/profile"]