-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
39 lines (27 loc) · 983 Bytes
/
Dockerfile
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
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
RUN apt-get update && apt-get -y dist-upgrade
# Install required tools
RUN apt-get install -y wget unzip
# Install Chrome
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb
# Install matching chromedriver
COPY install_chromedriver.sh /opt/install_chromedriver.sh
RUN bash /opt/install_chromedriver.sh
# Cleanup
RUN apt-get -y purge unzip \
&& apt-get -y --purge autoremove \
&& apt-get -y autoclean \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm /opt/install_chromedriver.sh
RUN groupadd -g 1000 localuser \
&& useradd -u 1000 -g 1000 -m localuser
USER localuser
# Make chromedriver container stop faster
STOPSIGNAL SIGKILL
# Start chromdriver with no access restrictions!
ENTRYPOINT ["/usr/local/bin/chrome-linux64/chrome", "--allowed-ips", "--allowed-origins=*"]
EXPOSE 9515