bicycle-statistics: Switch to alpine linux base image

Signed-off-by: Thomas Klaehn <thomas.klaehn@u-blox.com>
This commit is contained in:
Thomas Klaehn 2018-07-26 16:41:11 +02:00
parent e23a36e734
commit d414cbaed5
2 changed files with 9 additions and 12 deletions

View File

@ -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

8
run.sh
View File

@ -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