From d414cbaed53cee341d7f8d2485e537edd23c5399 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Thu, 26 Jul 2018 16:41:11 +0200 Subject: [PATCH] bicycle-statistics: Switch to alpine linux base image Signed-off-by: Thomas Klaehn --- Dockerfile | 13 +++++++------ run.sh | 8 ++------ 2 files changed, 9 insertions(+), 12 deletions(-) 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