Skip to content

Commit

Permalink
fix: use alpine
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <[email protected]>
  • Loading branch information
caarlos0 committed Apr 6, 2021
1 parent 5a2ec39 commit dfe72ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
10 changes: 8 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 6 additions & 9 deletions Dockerfile
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"]

0 comments on commit dfe72ef

Please sign in to comment.