File tree Expand file tree Collapse file tree 5 files changed +42
-21
lines changed Expand file tree Collapse file tree 5 files changed +42
-21
lines changed Original file line number Diff line number Diff line change 1
- FROM ubuntu:14 .04
1
+ FROM ubuntu:16 .04
2
2
MAINTAINER Doro Wu <fcwu.tw@gmail.com>
3
3
4
4
ENV DEBIAN_FRONTEND noninteractive
5
- ENV HOME /home/ubuntu
6
5
7
6
RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list
8
7
9
8
# built-in packages
10
9
RUN apt-get update \
11
- && apt-get install -y --force-yes -- no-install-recommends software-properties-common curl \
12
- && sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /' >> /etc/apt/sources.list.d/arc-theme.list" \
13
- && curl -SL http://download.opensuse.org/repositories/home:Horst3180/xUbuntu_16.04/Release.key | sudo apt-key add - \
10
+ && apt-get install -y --no-install-recommends software-properties-common curl \
11
+ && sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /' >> /etc/apt/sources.list.d/arc-theme.list" \
12
+ && curl -SL http://download.opensuse.org/repositories/home:Horst3180/xUbuntu_16.04/Release.key | apt-key add - \
14
13
&& add-apt-repository ppa:fcwu-tw/ppa \
15
14
&& apt-get update \
16
- && apt-get install -y --force-yes -- no-install-recommends \
15
+ && apt-get install -y --no-install-recommends --allow-unauthenticated \
17
16
supervisor \
18
17
openssh-server pwgen sudo vim-tiny \
19
18
net-tools \
@@ -26,6 +25,7 @@ RUN apt-get update \
26
25
python-pip python-dev build-essential \
27
26
mesa-utils libgl1-mesa-dri \
28
27
gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine pinta arc-theme \
28
+ dbus-x11 x11-utils \
29
29
&& apt-get autoclean \
30
30
&& apt-get autoremove \
31
31
&& rm -rf /var/lib/apt/lists/*
@@ -41,4 +41,6 @@ RUN pip install setuptools wheel && pip install -r /usr/lib/web/requirements.txt
41
41
42
42
EXPOSE 80
43
43
WORKDIR /root
44
+ ENV HOME=/home/ubuntu \
45
+ SHELL=/bin/bash
44
46
ENTRYPOINT ["/startup.sh" ]
Original file line number Diff line number Diff line change @@ -11,16 +11,40 @@ redirect_stderr=true
11
11
12
12
[program:lxsession]
13
13
priority=15
14
- directory=/home/ubuntu
15
- command=/usr/bin/lxsession
14
+ directory=/root
15
+ command=/usr/bin/openbox
16
16
user=root
17
17
autostart=true
18
18
autorestart=true
19
19
stopsignal=QUIT
20
- environment=DISPLAY=":1",HOME="/home/ubuntu "
21
- stdout_logfile=/var/log/lxsession .log
20
+ environment=DISPLAY=":1",HOME="/root",USER="root "
21
+ stdout_logfile=/var/log/openbox .log
22
22
redirect_stderr=true
23
23
24
+ [program:lxpanel]
25
+ priority=15
26
+ directory=/root
27
+ command=/usr/bin/lxpanel --profile LXDE
28
+ user=root
29
+ autostart=true
30
+ autorestart=true
31
+ stopsignal=QUIT
32
+ environment=DISPLAY=":1",HOME="/root",USER="root"
33
+ stdout_logfile=/var/log/lxpanel.log
34
+ redirect_stderr=true
35
+
36
+ [program:pcmanfm]
37
+ priority=15
38
+ directory=/root
39
+ command=/usr/bin/pcmanfm --desktop --profile LXDE
40
+ user=root
41
+ autostart=true
42
+ autorestart=true
43
+ stopsignal=QUIT
44
+ environment=DISPLAY=":1",HOME="/root",USER="root"
45
+ stdout_logfile=/var/log/pcmanfm.log
46
+
47
+
24
48
[program:x11vnc]
25
49
priority=20
26
50
directory=/
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ gtk-xft-antialias=1
17
17
gtk-xft-hinting=1
18
18
gtk-xft-hintstyle="hintslight"
19
19
gtk-xft-rgba="rgb"
20
- include "/home/ubuntu /.gtkrc-2.0.mine"
20
+ include "/root /.gtkrc-2.0.mine"
Original file line number Diff line number Diff line change 2
2
3
3
mkdir -p /var/run/sshd
4
4
5
- # create an ubuntu user
6
- # PASS=`pwgen -c -n -1 10`
7
- PASS=ubuntu
8
- # echo "Username: ubuntu Password: $PASS"
9
- id -u ubuntu & > /dev/null || useradd --create-home --shell /bin/bash --user-group --groups adm,sudo ubuntu
10
- echo " ubuntu:$PASS " | chpasswd
11
- chown -R ubuntu:ubuntu /home/ubuntu
12
- sudo -u ubuntu -i bash -c " mkdir -p /home/ubuntu/.config/pcmanfm/LXDE/ \
13
- && cp /usr/share/doro-lxde-wallpapers/desktop-items-0.conf /home/ubuntu/.config/pcmanfm/LXDE/"
5
+ chown -R root:root /root
6
+ mkdir -p /root/.config/pcmanfm/LXDE/
7
+ cp /usr/share/doro-lxde-wallpapers/desktop-items-0.conf /root/.config/pcmanfm/LXDE/
14
8
15
9
if [ -n " $VNC_PASSWORD " ]; then
16
10
echo -n " $VNC_PASSWORD " > /.password1
17
11
x11vnc -storepasswd $( cat /.password1) /.password2
18
12
chmod 400 /.password*
19
13
sed -i ' s/^command=x11vnc.*/& -rfbauth \/.password2/' /etc/supervisor/conf.d/supervisord.conf
14
+ export VNC_PASSWORD=
20
15
fi
21
16
22
17
cd /usr/lib/web && ./run.py > /var/log/web.log 2>&1 &
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def redirectme():
112
112
# check all running
113
113
for i in xrange (20 ):
114
114
output = subprocess .check_output (r"supervisorctl status | grep RUNNING | wc -l" , shell = True )
115
- if output .strip () == "4 " :
115
+ if output .strip () == "6 " :
116
116
FIRST = False
117
117
return HTML_REDIRECT
118
118
time .sleep (2 )
You can’t perform that action at this time.
0 commit comments