2020-07-30 22:53:20 +00:00
|
|
|
FROM python:3.8-slim-buster
|
|
|
|
|
2020-10-16 13:30:08 +00:00
|
|
|
LABEL maintainer="Luc VOISE" \
|
2020-07-30 22:53:20 +00:00
|
|
|
description="Original by Aiden Gilmartin. Speedtest to InfluxDB data bridge"
|
2020-07-31 02:23:23 +00:00
|
|
|
|
2020-07-30 22:53:20 +00:00
|
|
|
# Install dependencies
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get -q -y install --no-install-recommends apt-utils gnupg1 apt-transport-https dirmngr
|
|
|
|
|
|
|
|
# Install speedtest-cli
|
|
|
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61
|
|
|
|
RUN echo "deb https://ookla.bintray.com/debian buster main" | tee /etc/apt/sources.list.d/speedtest.list
|
|
|
|
RUN apt-get update && apt-get -q -y install speedtest
|
|
|
|
|
|
|
|
# Install Python packages
|
|
|
|
COPY requirements.txt /
|
|
|
|
RUN pip install -r /requirements.txt
|
|
|
|
|
|
|
|
# Clean up
|
|
|
|
RUN apt-get -q -y autoremove
|
|
|
|
RUN apt-get -q -y clean
|
|
|
|
RUN rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Final setup & execution
|
|
|
|
COPY . /app
|
|
|
|
WORKDIR /app
|
2019-11-02 00:09:20 +00:00
|
|
|
CMD ["python3", "-u", "main.py"]
|