-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (21 loc) · 845 Bytes
/
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
FROM alpine:3.20.3
LABEL maintainer="Chris Kankiewicz <Chris@ChrisKankiewicz.com>"
# Speedtest Version
ARG SPEEDTEST_VERSION=1.2.0
# Set tarball file URL
ARG TARBALL_URL=https://install.speedtest.net/app/cli/ookla-speedtest-${SPEEDTEST_VERSION}-linux-x86_64.tgz
# Create non-root user
RUN adduser -DHs /sbin/nologin speedtest
# Create the config file
COPY files/speedtest-cli.json /home/speedtest/.config/ookla/speedtest-cli.json
RUN chown -R speedtest /home/speedtest/.config
# Install dependencies and speedtest and chown files
RUN apk add --update ca-certificates tar tzdata wget \
&& wget -qO- ${TARBALL_URL} | tar -xz -C /usr/local/bin \
&& apk del tar wget && rm -rf /var/cache/apk/*
# Set the user
USER speedtest
# Set the working directory
WORKDIR /home/speedtest
# Set entrypoint
ENTRYPOINT ["/usr/local/bin/speedtest"]