2020-07-30 22:53:20 +00:00
|
|
|
FROM python:3.8-slim-buster
|
2021-05-19 13:37:30 +00:00
|
|
|
LABEL maintainer="Marty Oehme" \
|
|
|
|
description="Original by Aiden Gilmartin & Breadlysm."
|
2020-07-31 02:23:23 +00:00
|
|
|
|
2020-07-30 22:53:20 +00:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2021-01-16 21:15:21 +00:00
|
|
|
RUN true &&\
|
|
|
|
\
|
|
|
|
# Install dependencies
|
|
|
|
apt-get update && \
|
|
|
|
apt-get -q -y install --no-install-recommends apt-utils gnupg1 apt-transport-https dirmngr && \
|
|
|
|
\
|
2021-05-19 13:37:30 +00:00
|
|
|
# Add repos
|
|
|
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61 && \
|
|
|
|
echo "deb https://ookla.bintray.com/debian buster main" > /etc/apt/sources.list.d/speedtest.list && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get -q -y install --no-install-recommends speedtest && \
|
|
|
|
\
|
2020-07-30 22:53:20 +00:00
|
|
|
# Install Python packages
|
2021-05-16 11:50:03 +00:00
|
|
|
pip3 install pythonping influxdb-client && \
|
2021-01-16 21:15:21 +00:00
|
|
|
\
|
2020-07-30 22:53:20 +00:00
|
|
|
# Clean up
|
2021-01-16 21:15:21 +00:00
|
|
|
apt-get -q -y autoremove && apt-get -q -y clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2020-07-30 22:53:20 +00:00
|
|
|
|
|
|
|
# Final setup & execution
|
2021-01-16 21:15:21 +00:00
|
|
|
ADD . /app
|
2020-07-30 22:53:20 +00:00
|
|
|
WORKDIR /app
|
2021-01-16 21:15:21 +00:00
|
|
|
ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]
|
|
|
|
CMD ["main.py"]
|