diff --git a/Dockerfile b/Dockerfile index cc59a25..d322611 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,19 @@ -FROM debian:latest +FROM alpine:latest -RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade -yq && \ - DEBIAN_FRONTEND=nonintercative apt-get install -yq python python-pip mosquitto git +RUN apk update && apk upgrade -RUN yes | pip install paho-mqtt +RUN apk add --update --no-cache python python-dev py-pip git gcc build-base freetype-dev libpng-dev + +RUN yes | pip install --upgrade pip RUN yes | pip install watchdog RUN yes | pip install geopy RUN yes | pip install gpxpy +RUN yes | pip install numpy RUN yes | pip install matplotlib RUN yes | pip install pandas -RUN yes | pip install numpy RUN git clone https://git.blackfinn.de/python/bicycle-statistics.git +RUN mkdir -p /lib/systemd/system/ RUN cd bicycle-statistics && python setup.py install RUN rm -rf bicycle-statistics diff --git a/run.sh b/run.sh index ae3017b..b1f4e25 100755 --- a/run.sh +++ b/run.sh @@ -1,9 +1,5 @@ -#!/bin/bash -/etc/init.d/mosquitto start - -sleep 1 - -/usr/local/bin/bicycle-stat /bs_in /bs_out +#!/bin/sh +python -m bicycle_statistics /bs_in /bs_out # if argument(s) given - execute argument(s) in container. Otherwise loop. if [ "$#" -gt 0 ]; then