FROM resin/rpi-raspbian:jessie-20170531

RUN apt-get update
RUN apt-get install -y curl vim mc gcc python-dev  python-pip
# netbase is needed for fping
RUN apt-get install -y netbase fping

RUN pip install --upgrade pip setuptools

RUN pip install vodka graphsrv
RUN pip install vaping

COPY config.yml /vaping/config.yml
EXPOSE 7021

CMD rm -f /vaping/vaping.pid && vaping --home=/vaping/ --debug  --verbose start

HEALTHCHECK --interval=10s CMD curl -I -s localhost:7021 | grep "200 OK"
