robinmanuelthiel / speedtest

Check internet bandwidth from a Docker container and save the results to an InfluxDB
MIT License
176 stars 47 forks source link

Dockerfile does not build, speedtest not a package #8

Closed MorganLindqvist closed 2 years ago

MorganLindqvist commented 2 years ago

Hi,

When trying to build the speedtest docker image I discovered that it fails in building for me. The applicable log are as follows:

Step 4/6 : RUN apt-get install speedtest
 ---> Running in 4064acb0cbd4
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package speedtest
The command '/bin/sh -c apt-get install speedtest' returned a non-zero code: 100

Searching for installable packages I found that there is a package called speedtest-cli. Have they change the name of the package or is there some other strange error?

The binary installed with speedtest-cli package have different formats of the command line arguments and the output is slightly different resulting in the the file speedtest.sh needs to be modified.

If this is the way to go I can make a pull request fixing it if it would help.

I am running the commands on Ubuntu 22.04 on a x86_64 platform and using docker version 20.10.14.

/Morgan

MorganLindqvist commented 2 years ago

Hi again,

Looking more into this I found that the reason speedtest package is not available is since the key is unavailable. Among the last lines of the install_deb.sh file hides the output of apt update. The output is for me:.

Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease                    
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease            
Get:4 https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease [24.5 kB]
Err:4 https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8E61C2AB9A6D1557
Reading package lists... Done
W: GPG error: https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8E61C2AB9A6D1557
E: The repository 'https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Will continue to look why key is not installed.

/Morgan

MorganLindqvist commented 2 years ago

Hi again,

Received the following anser from the Speedtest support, i.e. they are aware of the problem and hopefully working on fixing it.

We are aware of an issue installing the CLI via the Debian/Ubuntu instructions. For the time being you can download the tarball version of the CLI client and use that. You can download the tar file by clicking the Download for Linux button at the bottom of the CLI page. Select the architecture you need from the dropdown menu and the tar file should download. I can close the ticket when they have fixed the issue, or you can close it now since it is no error in this code.

robinmanuelthiel commented 2 years ago

Thanks for documenting this here!