--- a +++ b/trunk/wharfie/examples/PyLoad/Wharfile @@ -0,0 +1,80 @@ +# +# This is an example of a Wharfie image +# with pyload. It is derived from the +# docker container writl/pyload +# + +FROM debian_armel_stretch +TO raspberrypi.tar + +RUN sed -i 's,main,main non-free,' /etc/apt/sources.list + +RUN apt-get update && apt-get install -y --no-install-recommends \ + systemd-sysv \ + dhcpcd5 \ + wpasupplicant \ + kmod \ + wireless-tools \ + net-tools \ + openssh-server \ + python \ + locales \ + python-setuptools \ + python-requests \ + python-pycurl \ + python-crypto \ + python-imaging \ + python-pyxmpp \ + python-jinja2 \ + python-thrift \ + python-feedparser \ + python-beautifulsoup \ + python-pip \ + tesseract-ocr \ + python-beaker \ + unrar \ + gocr \ + python-django \ + git \ + rhino \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && pip install Send2Trash + +# Set the locale +RUN locale-gen en_US.UTF-8 + +RUN git clone https://github.com/pyload/pyload.git /opt/pyload \ + && cd /opt/pyload \ + && git checkout stable \ + && echo "/opt/pyload/pyload-config" > /opt/pyload/module/config/configdir + +ADD pyload-config/ /opt/pyload/pyload-config +ADD ../common/files/pyload.service /etc/systemd/system/pyload.service + +# Add user 'wharfie' with password 'wharfie' for interactive login +RUN useradd -ms /bin/bash wharfie; echo "wharfie:wharfie" | chpasswd; echo "root:root" | chpasswd; + +# Add fstab +ADD ../common/files/fstab /etc/fstab + +# Change Hostname +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 + +# +# Wireless +# +# Add files for wireless network configuration +ADD ../common/files/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf +ADD ../common/files/wireless.conf /etc/modules-load.d/wireless.conf +RUN sed -i 's,^Requires,#Requires,' /lib/systemd/system/wpa_supplicant@.service; \ + systemctl enable wpa_supplicant@wlan0.service; \ + systemctl enable pyload.service; + + +# +# Bootstrategy: Raspberry PI +# +RUN HOST \ + ../../bootstrategy/raspberrypi.sh rpi.img +