Browse Source

Update the speedtest binary

- Update the gpg key
- Update the sources.list file

Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
Jeremy MAURO 3 năm trước cách đây
mục cha
commit
098e35ce6a
1 tập tin đã thay đổi với 9 bổ sung7 xóa
  1. 9 7
      Dockerfile

+ 9 - 7
Dockerfile

@@ -1,17 +1,19 @@
 FROM debian:buster-slim
 
-ENV INSTALL_KEY 379CE192D401AB61
-ENV DEB_DISTRO buster
+ENV GPG_KEY https://packagecloud.io/ookla/speedtest-cli/gpgkey
+ENV OOKLA_URL https://packagecloud.io/ookla/speedtest-cli/debian/
+ENV OOKLA_KEY_GPG /etc/apt/trusted.gpg.d/ookla-speedtest.gpg
+ENV DEB_DISTRO bullseye
 
 # install requirements curl & jq
 RUN apt-get update && apt-get install -y curl jq
 
 # install speedtest
-RUN apt-get update && apt-get install -y gnupg1 apt-transport-https dirmngr && \
-	apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY && \
-	echo "deb https://ookla.bintray.com/debian ${DEB_DISTRO} main" | tee /etc/apt/sources.list.d/speedtest.list && \
-	apt-get update && \
-	apt-get install speedtest
+RUN apt-get update && apt-get install -y gnupg1 apt-transport-https dirmngr
+RUN curl -L ${GPG_KEY} | gpg --dearmor -o ${OOKLA_KEY_GPG}
+RUN echo "deb [arch=amd64 signed-by=${OOKLA_KEY_GPG}] ${OOKLA_URL} ${DEB_DISTRO} main" | tee /etc/apt/sources.list.d/speedtest.list && \
+        apt-get update && \
+        apt-get install speedtest
 
 COPY scripts/docker-entrypoint.sh /usr/local/bin
 ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]