-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathDockerfile
35 lines (27 loc) · 1.13 KB
/
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
FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive
RUN set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl socat \
&& apt-get install -y --no-install-recommends xvfb x11vnc fluxbox xterm \
&& apt-get install -y --no-install-recommends sudo \
&& apt-get install -y --no-install-recommends supervisor \
&& rm -rf /var/lib/apt/lists/*
RUN set -xe \
&& curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
#========================================
# Add normal user with passwordless sudo
#========================================
RUN set -xe \
&& useradd -u 1000 -g 100 -G sudo --shell /bin/bash --no-create-home --home-dir /tmp user \
&& echo 'ALL ALL = (ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
COPY supervisord.conf /etc/
COPY entry.sh /
User user
WORKDIR /tmp
VOLUME /tmp/chrome-data
CMD ["/entry.sh"]