-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
103 lines (90 loc) · 2.63 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Pull base image
FROM ubuntu:14.04
#========================
# Miscellaneous packages
#========================
RUN apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
ca-certificates \
unzip \
wget \
vim \
&& rm -rf /var/lib/apt/lists/*
#========================================
# Add normal user with passwordless sudo
#========================================
RUN sudo useradd user --shell /bin/bash --create-home \
&& sudo usermod -a -G sudo user \
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& echo 'user:pazzword' | chpasswd
#============================
# Some configuration options
#============================
ENV SCREEN_WIDTH 1680
ENV SCREEN_HEIGHT 1050
ENV SCREEN_DEPTH 24
ENV DISPLAY :0
#===============
# Google Chrome
#===============
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-chrome.list \
&& apt-get update -qqy \
&& apt-get -qqy install \
google-chrome-stable \
&& rm /etc/apt/sources.list.d/google-chrome.list \
&& rm -rf /var/lib/apt/lists/*
#=================================
# Chrome Launch Script Modication
#=================================
COPY chrome_launcher.sh /opt/google/chrome/google-chrome
RUN chmod +x /opt/google/chrome/google-chrome
#=================================
# x11vnc
#=================================
# Install vnc, xvfb in order to create a 'fake' display and firefox
RUN apt-get update -qqy
RUN apt-get install -y x11vnc xvfb
# Setup a password
USER user
RUN mkdir ~/.vnc
RUN x11vnc -storepasswd pazzword ~/.vnc/passwd
USER root
#=================
# Locale settings
#=================
ENV LANGUAGE en_US.UTF-8
ENV LANG en_US.UTF-8
RUN locale-gen en_US.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales \
&& apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
language-pack-en \
&& rm -rf /var/lib/apt/lists/*
#=======
# Fonts
#=======
RUN apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
fonts-ipafont-gothic \
xfonts-100dpi \
xfonts-75dpi \
xfonts-cyrillic \
xfonts-scalable \
&& rm -rf /var/lib/apt/lists/*
#=========
# fluxbox
# A fast, lightweight and responsive window manager
#=========
RUN apt-get update -qqy \
&& apt-get -qqy install \
fluxbox \
&& rm -rf /var/lib/apt/lists/*
#==============================
# Scripts to run
#==============================
COPY entry_point.sh /opt/bin/entry_point.sh
RUN chmod +x /opt/bin/entry_point.sh
EXPOSE 5900
USER user
ENTRYPOINT ["/opt/bin/entry_point.sh"]