FROM resin/rpi-raspbian:jessie-20170531

RUN apt-get update && \
    apt-get install -y python-smbus i2c-tools python-cherrypy3

RUN sudo echo "Europe/Berlin" > /etc/timezone
RUN sudo dpkg-reconfigure -f noninteractive tzdata

COPY susvd-en-2.2-systemd-all.deb /tmp/susvd-en-2.2-systemd-all.deb
RUN  dpkg -i /tmp/susvd-en-2.2-systemd-all.deb

COPY server.py /server.py

WORKDIR  /opt/susvd


CMD echo "$(date '+%a %H:%M:%S %h %d %Y')" && rm -f /run/susvd.pid && /opt/susvd/susvd -start && python /server.py

