bicycle-statistics: Switch to alpine linux base image
Signed-off-by: Thomas Klaehn <thomas.klaehn@u-blox.com>
This commit is contained in:
parent
e23a36e734
commit
d414cbaed5
13
Dockerfile
13
Dockerfile
@ -1,18 +1,19 @@
|
|||||||
FROM debian:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
RUN apk update && apk upgrade
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade -yq && \
|
|
||||||
DEBIAN_FRONTEND=nonintercative apt-get install -yq python python-pip mosquitto git
|
|
||||||
|
|
||||||
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 watchdog
|
||||||
RUN yes | pip install geopy
|
RUN yes | pip install geopy
|
||||||
RUN yes | pip install gpxpy
|
RUN yes | pip install gpxpy
|
||||||
|
RUN yes | pip install numpy
|
||||||
RUN yes | pip install matplotlib
|
RUN yes | pip install matplotlib
|
||||||
RUN yes | pip install pandas
|
RUN yes | pip install pandas
|
||||||
RUN yes | pip install numpy
|
|
||||||
|
|
||||||
RUN git clone https://git.blackfinn.de/python/bicycle-statistics.git
|
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 cd bicycle-statistics && python setup.py install
|
||||||
RUN rm -rf bicycle-statistics
|
RUN rm -rf bicycle-statistics
|
||||||
|
|
||||||
|
8
run.sh
8
run.sh
@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
/etc/init.d/mosquitto start
|
python -m bicycle_statistics /bs_in /bs_out
|
||||||
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
/usr/local/bin/bicycle-stat /bs_in /bs_out
|
|
||||||
|
|
||||||
# if argument(s) given - execute argument(s) in container. Otherwise loop.
|
# if argument(s) given - execute argument(s) in container. Otherwise loop.
|
||||||
if [ "$#" -gt 0 ]; then
|
if [ "$#" -gt 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user