From 61fb17ea67efe2728b8e2f2df19c1e0ba658869d Mon Sep 17 00:00:00 2001 From: Leigh Phillips Date: Sat, 16 Jan 2021 13:15:21 -0800 Subject: [PATCH] Update Dockerfile Make hub eligible - Remove any proprietary binaries (Oookla) & install those at container initialization instead. --- Dockerfile | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 888fa80..821207e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,24 @@ FROM python:3.8-slim-buster - -LABEL maintainer="Luc VOISE" \ +LABEL maintainer="Team QLUSTOR " \ description="Original by Aiden Gilmartin. Speedtest to InfluxDB data bridge" -# 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 +RUN true &&\ +\ +# Install dependencies +apt-get update && \ +apt-get -q -y install --no-install-recommends apt-utils gnupg1 apt-transport-https dirmngr && \ +\ # Install Python packages -COPY requirements.txt / -RUN pip install -r /requirements.txt - +pip3 install influxdb && \ +\ # Clean up -RUN apt-get -q -y autoremove -RUN apt-get -q -y clean -RUN rm -rf /var/lib/apt/lists/* +apt-get -q -y autoremove && apt-get -q -y clean && \ +rm -rf /var/lib/apt/lists/* # Final setup & execution -COPY . /app +ADD . /app WORKDIR /app -CMD ["python3", "-u", "main.py"] \ No newline at end of file +ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"] +CMD ["main.py"]