forked from loganmarchione/docker-speedtest-influxdbv2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (27 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.13.0rc1-slim
ARG BUILD_DATE
LABEL \
maintainer="Diego Castilho <[email protected]>" \
org.opencontainers.image.authors="Diego Castilho <[email protected]>" \
org.opencontainers.image.title="docker-speedtest-influxdb" \
org.opencontainers.image.description="Runs Ookla's Speedtest CLI program in Docker, sends the results to InfluxDB" \
org.opencontainers.image.created=$BUILD_DATE
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && apt-get -y install --no-install-recommends \
ca-certificates \
curl \
gnupg2 \
tzdata && \
curl -s https://install.speedtest.net/app/cli/install.deb.sh | bash && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://packagecloud.io/ookla/speedtest-cli/gpgkey | gpg --dearmor > /etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg && \
apt-get update && apt-get -y install --no-install-recommends speedtest && \
rm -rf /var/lib/apt/lists/* && \
adduser --system speedtest
USER speedtest
WORKDIR /usr/src/app
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
COPY speedtest.py .
COPY VERSION /
CMD ["python", "-u", "./speedtest.py"]