Skip to content

Commit 8045c37

Browse files
committed
feat: upgrade to Ubuntu 16.04
1 parent 4941a6f commit 8045c37

File tree

5 files changed

+42
-21
lines changed

5 files changed

+42
-21
lines changed

Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
FROM ubuntu:14.04
1+
FROM ubuntu:16.04
22
MAINTAINER Doro Wu <fcwu.tw@gmail.com>
33

44
ENV DEBIAN_FRONTEND noninteractive
5-
ENV HOME /home/ubuntu
65

76
RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list
87

98
# built-in packages
109
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 - \
1413
&& add-apt-repository ppa:fcwu-tw/ppa \
1514
&& apt-get update \
16-
&& apt-get install -y --force-yes --no-install-recommends \
15+
&& apt-get install -y --no-install-recommends --allow-unauthenticated \
1716
supervisor \
1817
openssh-server pwgen sudo vim-tiny \
1918
net-tools \
@@ -26,6 +25,7 @@ RUN apt-get update \
2625
python-pip python-dev build-essential \
2726
mesa-utils libgl1-mesa-dri \
2827
gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine pinta arc-theme \
28+
dbus-x11 x11-utils \
2929
&& apt-get autoclean \
3030
&& apt-get autoremove \
3131
&& rm -rf /var/lib/apt/lists/*
@@ -41,4 +41,6 @@ RUN pip install setuptools wheel && pip install -r /usr/lib/web/requirements.txt
4141

4242
EXPOSE 80
4343
WORKDIR /root
44+
ENV HOME=/home/ubuntu \
45+
SHELL=/bin/bash
4446
ENTRYPOINT ["/startup.sh"]

image/etc/supervisor/conf.d/supervisord.conf

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,40 @@ redirect_stderr=true
1111

1212
[program:lxsession]
1313
priority=15
14-
directory=/home/ubuntu
15-
command=/usr/bin/lxsession
14+
directory=/root
15+
command=/usr/bin/openbox
1616
user=root
1717
autostart=true
1818
autorestart=true
1919
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
2222
redirect_stderr=true
2323

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+
2448
[program:x11vnc]
2549
priority=20
2650
directory=/

image/home/ubuntu/.gtkrc-2.0 renamed to image/root/.gtkrc-2.0

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ gtk-xft-antialias=1
1717
gtk-xft-hinting=1
1818
gtk-xft-hintstyle="hintslight"
1919
gtk-xft-rgba="rgb"
20-
include "/home/ubuntu/.gtkrc-2.0.mine"
20+
include "/root/.gtkrc-2.0.mine"

image/startup.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,16 @@
22

33
mkdir -p /var/run/sshd
44

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/
148

159
if [ -n "$VNC_PASSWORD" ]; then
1610
echo -n "$VNC_PASSWORD" > /.password1
1711
x11vnc -storepasswd $(cat /.password1) /.password2
1812
chmod 400 /.password*
1913
sed -i 's/^command=x11vnc.*/& -rfbauth \/.password2/' /etc/supervisor/conf.d/supervisord.conf
14+
export VNC_PASSWORD=
2015
fi
2116

2217
cd /usr/lib/web && ./run.py > /var/log/web.log 2>&1 &

image/usr/lib/web/lightop/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def redirectme():
112112
# check all running
113113
for i in xrange(20):
114114
output = subprocess.check_output(r"supervisorctl status | grep RUNNING | wc -l", shell=True)
115-
if output.strip() == "4":
115+
if output.strip() == "6":
116116
FIRST = False
117117
return HTML_REDIRECT
118118
time.sleep(2)

0 commit comments

Comments
 (0)