-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 814 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 814 Bytes
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
# Dockerfile
FROM node:20-bookworm-slim
RUN mkdir -p /app/data
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl gnupg python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Ookla (real CLI)
RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash \
&& apt-get update \
&& apt-get install -y --no-install-recommends speedtest \
&& rm -rf /var/lib/apt/lists/*
# Verify Ookla is real
RUN /usr/bin/speedtest --version | grep -i -E "ookla|speedtest by ookla"
# python speedtest-cli (pip)
RUN pip3 install --no-cache-dir speedtest-cli --break-system-packages
# IMPORTANT: remove the pip-created "speedtest" shim if it exists
RUN rm -f /usr/local/bin/speedtest || true
WORKDIR /app
CMD ["node", "stats-api.js"]