File tree Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:12.04
2+ MAINTAINER Doro Wu <fcwu.tw@gmail.com>
3+
4+ ENV DEBIAN_FRONTEND noninteractive
5+ ENV HTTP_PROXY http://172.17.42.1:3134
6+
7+ # setup our Ubuntu sources (ADD breaks caching)
8+ RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise main\n \
9+ deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse\n \
10+ deb http://us.archive.ubuntu.com/ubuntu/ precise universe\n \
11+ deb http://us.archive.ubuntu.com/ubuntu/ precise restricted\n \
12+ " > /etc/apt/sources.list
13+
14+ # no Upstart or DBus
15+ # https://github.com/dotcloud/docker/issues/1724#issuecomment-26294856
16+ RUN apt-mark hold initscripts udev plymouth mountall
17+ RUN dpkg-divert --local --rename --add /sbin/initctl && ln -s /bin/true /sbin/initctl
18+
19+ RUN apt-get update
20+
21+ # install our "base" environment
22+ RUN apt-get install -y --no-install-recommends openssh-server pwgen sudo vim-tiny
23+ RUN apt-get install -y --no-install-recommends lxde
24+ RUN apt-get install -y --no-install-recommends x11vnc xvfb
25+ RUN apt-get install -y supervisor
26+ RUN apt-get install -y libreoffice
27+ RUN apt-get install -y firefox
28+
29+ ADD startup.sh /
30+ ADD supervisord.conf /
31+
32+ # clean up after ourselves
33+ RUN apt-get clean
34+
35+ EXPOSE 5900
36+ EXPOSE 22
37+ WORKDIR /
38+ ENTRYPOINT ["/startup.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ mkdir /var/run/sshd
4+
5+ # create an ubuntu user
6+ PASS=` pwgen -c -n -1 10`
7+ PASS=ubuntu
8+ echo " User: ubuntu Pass: $PASS "
9+ useradd --create-home --shell /bin/bash --user-group --groups adm,sudo ubuntu
10+ echo " ubuntu:$PASS " | chpasswd
11+
12+ exec /usr/bin/supervisord -c /supervisord.conf -n
Original file line number Diff line number Diff line change 1+ [supervisord]
2+ nodaemon=false
3+
4+ [program:ssh]
5+ priority=10
6+ directory=/
7+ command=/usr/sbin/sshd -D
8+ user=root
9+ autostart=true
10+ autorestart=true
11+ stopsignal=QUIT
12+
13+ [program:xvfb]
14+ priority=10
15+ directory=/
16+ command=/usr/bin/Xvfb :1 -screen 0 1024x768x16
17+ user=root
18+ autostart=true
19+ autorestart=true
20+ stopsignal=QUIT
21+ stdout_logfile=/var/log/xvfb.log
22+ stderr_logfile=/var/log/xvfb.err
23+
24+ [program:lxsession]
25+ priority=15
26+ directory=/home/ubuntu
27+ command=/usr/bin/lxsession
28+ user=ubuntu
29+ autostart=true
30+ autorestart=true
31+ stopsignal=QUIT
32+ environment=DISPLAY=":1"
33+ stdout_logfile=/var/log/lxsession.log
34+ stderr_logfile=/var/log/lxsession.err
35+
36+ [program:x11vnc]
37+ priority=20
38+ directory=/
39+ command=x11vnc -display :1 -xkb
40+ #command=x11vnc -display :1 -listen localhost -xkb
41+ user=root
42+ autostart=true
43+ autorestart=true
44+ stopsignal=QUIT
45+ stdout_logfile=/var/log/x11vnc.log
46+ stderr_logfile=/var/log/x11vnc.err
You can’t perform that action at this time.
0 commit comments