-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (26 loc) · 1016 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
FROM ubuntu:groovy
# Update packages
RUN apt-get update && apt-get upgrade && apt-get clean
# Apps that normally require interactive config
ENV TZ=America/Chicago
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y keyboard-configuration
# Install dependencies
RUN apt-get install -y x11vnc xorg fluxbox xvfb wmctrl
RUN apt-get install -y wget gnupg2
# Add official chrome repo to apt
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
# Install Chrome
RUN apt-get update && apt-get -y install google-chrome-stable
# Add non-root user
RUN useradd chrome
RUN mkdir -p /home/chrome && chown chrome:chrome /home/chrome
# Copy files
COPY bootstrap.sh /
# Ensure bootstrap is executable
RUN chmod a+x bootstrap.sh
# Switch to non-root user
USER chrome
# Entrypoint
CMD '/bootstrap.sh'