a | b/trunk/wharfie/examples/PyLoad/Wharfile | ||
---|---|---|---|
1 | # |
||
2 | # This is an example of a Wharfie image |
||
3 | # with pyload. It is derived from the |
||
4 | # docker container writl/pyload |
||
5 | # |
||
6 | |||
7 | FROM debian_armel_stretch |
||
8 | TO raspberrypi.tar |
||
9 | |||
10 | RUN sed -i 's,main,main non-free,' /etc/apt/sources.list |
||
11 | |||
12 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
||
13 | systemd-sysv \ |
||
14 | dhcpcd5 \ |
||
15 | wpasupplicant \ |
||
16 | kmod \ |
||
17 | wireless-tools \ |
||
18 | net-tools \ |
||
19 | openssh-server \ |
||
20 | python \ |
||
21 | locales \ |
||
22 | python-setuptools \ |
||
23 | python-requests \ |
||
24 | python-pycurl \ |
||
25 | python-crypto \ |
||
26 | python-imaging \ |
||
27 | python-pyxmpp \ |
||
28 | python-jinja2 \ |
||
29 | python-thrift \ |
||
30 | python-feedparser \ |
||
31 | python-beautifulsoup \ |
||
32 | python-pip \ |
||
33 | tesseract-ocr \ |
||
34 | python-beaker \ |
||
35 | unrar \ |
||
36 | gocr \ |
||
37 | python-django \ |
||
38 | git \ |
||
39 | rhino \ |
||
40 | && apt-get clean \ |
||
41 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ |
||
42 | && pip install Send2Trash |
||
43 | |||
44 | # Set the locale |
||
45 | RUN locale-gen en_US.UTF-8 |
||
46 | |||
47 | RUN git clone https://github.com/pyload/pyload.git /opt/pyload \ |
||
48 | && cd /opt/pyload \ |
||
49 | && git checkout stable \ |
||
50 | && echo "/opt/pyload/pyload-config" > /opt/pyload/module/config/configdir |
||
51 | |||
52 | ADD pyload-config/ /opt/pyload/pyload-config |
||
53 | ADD ../common/files/pyload.service /etc/systemd/system/pyload.service |
||
54 | |||
55 | # Add user 'wharfie' with password 'wharfie' for interactive login |
||
56 | RUN useradd -ms /bin/bash wharfie; echo "wharfie:wharfie" | chpasswd; echo "root:root" | chpasswd; |
||
57 | |||
58 | # Add fstab |
||
59 | ADD ../common/files/fstab /etc/fstab |
||
60 | |||
61 | # Change Hostname |
||
62 | RUN HOST [ -f /usr/share/dict/words ] && printf "Wharfie-%s" $(grep '^[A-Z]' /usr/share/dict/words | sed -n "$(expr ${RANDOM} % $(grep '^[A-Z]' /usr/share/dict/words | wc -l))p" | sed "s,'.*,,") > etc/hostname |
||
63 | |||
64 | # |
||
65 | # Wireless |
||
66 | # |
||
67 | # Add files for wireless network configuration |
||
68 | ADD ../common/files/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf |
||
69 | ADD ../common/files/wireless.conf /etc/modules-load.d/wireless.conf |
||
70 | RUN sed -i 's,^Requires,#Requires,' /lib/systemd/system/wpa_supplicant@.service; \ |
||
71 | systemctl enable wpa_supplicant@wlan0.service; \ |
||
72 | systemctl enable pyload.service; |
||
73 | |||
74 | |||
75 | # |
||
76 | # Bootstrategy: Raspberry PI |
||
77 | # |
||
78 | RUN HOST \ |
||
79 | ../../bootstrategy/raspberrypi.sh rpi.img |
||
80 |