-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Carlos Alexandro Becker <[email protected]>
- Loading branch information
Showing
2 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,16 @@ nfpms: | |
maintainer: Carlos Becker <[email protected]> | ||
description: Exports Speedtest results to the Prometheus format | ||
formats: | ||
- apk | ||
- deb | ||
- rpm | ||
dependencies: | ||
- speedtest | ||
overrides: | ||
deb: | ||
dependencies: | ||
- speedtest | ||
rpm: | ||
dependencies: | ||
- speedtest | ||
brews: | ||
- tap: | ||
owner: caarlos0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
FROM ubuntu | ||
FROM alpine | ||
EXPOSE 9876 | ||
WORKDIR / | ||
RUN apt update && \ | ||
apt install -y gnupg1 apt-transport-https dirmngr && \ | ||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61 && \ | ||
echo "deb https://ookla.bintray.com/debian generic main" | tee /etc/apt/sources.list.d/speedtest.list && \ | ||
apt update && \ | ||
apt install -y speedtest | ||
COPY speedtest-exporter*.deb /tmp | ||
RUN dpkg -i /tmp/speedtest-exporter*.deb | ||
RUN wget -O /tmp/speedtest.tgz https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-$(apk info --print-arch)-linux.tgz && \ | ||
tar xvfz /tmp/speedtest.tgz -C /usr/local/bin speedtest && \ | ||
rm -rf /tmp/speedtest.tgz | ||
COPY speedtest-exporter*.apk /tmp | ||
RUN apk add --allow-untrusted /tmp/speedtest-exporter*.apk | ||
ENTRYPOINT ["/usr/local/bin/speedtest-exporter"] |