internet-speed-logger icon indicating copy to clipboard operation
internet-speed-logger copied to clipboard

Feature request: Raspberry Pi / ARM compiled containers

Open fitzgeraldsteele opened this issue 4 years ago • 14 comments

What do you think it would take to compile this to ARM containers? Would it be as simple as picking mongodb ARM based image to begin with?

I'd love to be able to throw this on the same RPI I have runing PiHole on my network.

fitzgeraldsteele avatar Mar 26 '20 18:03 fitzgeraldsteele

👍

Aypac avatar Mar 30 '20 21:03 Aypac

That's a fantastic idea! Thank you! I'll track it here - it should be pretty straight forward to make it happen 👍

brennentsmith avatar Apr 03 '20 15:04 brennentsmith

Hi @brennentsmith - has there been any progress on this? I'm on a gigabit connection so the old Speedtest-cli method is unreliable and I'd like to use your solution however I'm running it on a RPi 4 B.

drewpost avatar Apr 28 '20 11:04 drewpost

So, I had a play with this tonight as I wanted to use an Orange Pi. Turns out this image is easy, it's mongodb that isn't. For this image, I made some minor changes to the Dockerfile and then built it locally (docker-compose -f docker-compose -f docker-compose-dev.yml build).

https://github.com/brennentsmith/internet-speed-logger/compare/master...timwsuqld:armv7

In the end, I found a Mongodb 3 image, manually created the user

$ sudo docker exec -it internet-speed-logger_mongo_1 mongo admin
use speedtest
db.createUser({ user: "speedtest", pwd: "speedtest", roles: [{ role: "dbOwner", db: "speedtest" }] })

It's highly possible this created an insecure image, but that shouldn't be a big deal as it's only exposed to the other containers.

If anyone can find modern and maintained Mongodb images for arm32v7 please point me to them and I'll update my branch to use them

timwsuqld avatar Jun 23 '20 12:06 timwsuqld

hello, i just registered to ask if there's some progress with the raspberry docker image? i tried tims fork but i'm getting lots of exec format error, which probably means i'm doing something horrbily wrong or the fork isnt ready to use yet.

MarcoH2O avatar Jun 24 '20 17:06 MarcoH2O

@MarcoH2O My fork really isn't ready for us, it was a hack job to get it working. In particular, you can't docker-compose up -d, you need to build the correct images. docker-compose -f docker-compose -f docker-compose-dev.yml build will do a local build, after that you can docker-compose up -d. If you pull the images from the docker hub (so not building them) you'll get the exec format error.

Also, make sure you're using the armv7 branch of my repo.

timwsuqld avatar Jun 24 '20 23:06 timwsuqld

@timwsuqld thank you for the advice, i tried what you said and it worked so far. it started and ttried to connect ot mongo but couldnt becaue "authentication failed". i tried to manually create the user for mongo unfotunately it didnt worked out because the container is not running. it looks like that the container is shutting down imediately after start.

do i really have to put 2x the docker-compose -f in docker-compose -f docker-compose -f docker-compose-dev.yml build when building the container? it gave me an error about ./docker-compose file not found or something like that. it worked with a single docker-compose -f tho.

i think i'll wait until we have an official docker image for raspberry, i dont think i'm skilled enough to debug.

@brennentsmith thank you for that awesome piece of software here, looking forward to the raspberry release

MarcoH2O avatar Jun 26 '20 13:06 MarcoH2O

@timwsuqld Thank you for forking this with the ARMv7 settings, I got this working on my Pi4.

Like myself, I think some people are new to GIT/not following the thread correctly(me) so once I worked it out I thought I would share my step by step commands.

Step by Step Commands

  1. git clone --single-branch --branch armv7 https://github.com/timwsuqld/internet-speed-logger.git
  2. cd internet-speed-logger
  3. docker-compose -f docker-compose-dev.yml build
  4. docker-compose up -d
  5. sudo docker exec -it internet-speed-logger_mongo_1 mongo admin

Now Inside MangoDB

  1. use speedtest
  2. db.createUser({ user: "speedtest", pwd: "speedtest", roles: [{ role: "dbOwner", db: "speedtest" }] })
  3. exit

Back In Pi User (not sure if you need to restart the speed test containers but I did for good measure)

  1. docker restart internet-speed-logger_speedlogger-runner_1
  2. docker restart internet-speed-logger_speedlogger-web_1

You should be able to open a webpage to the IP address of your Pi port 3000 (example: http://127.0.0.1:3000/ )

Help WithBasic Troubleshooting This is not how to fix this is just helping to give you a clue

You can confirm containers are online and running

  • docker ps -f name=internet-speed-logger

Check Logs for the containers

  • docker logs internet-speed-logger_speedlogger-runner_1 <---- Runs the speed tests
  • docker logs internet-speed-logger_speedlogger-web_1 <---- webserver to view results
  • docker logs internet-speed-logger_mongo_1 <---- database part to save tests

Cladex avatar Oct 19 '20 14:10 Cladex

I get curl: (6) Could not resolve host: ookla.bintray.com when running docker-compose -f docker-compose-dev.yml build, how can I fix that?

cristacheda avatar Dec 21 '20 17:12 cristacheda

@Cladex thank you very much for your step by step guide. it worked like a charm!

MarcoH2O avatar Dec 22 '20 17:12 MarcoH2O

Hi there @Cladex, I'm having problems folowing your step by step guide..

I got this error:

$ docker-compose -f docker-compose-dev.yml build
ERROR: Version in "./docker-compose-dev.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

Using docker-compose version 1.21.0 and rasbian

mcpeixoto avatar Feb 25 '21 21:02 mcpeixoto

Mate,

@Cladex and @timwsuqld (and obviously @brennentsmith) you are heros! I have been beating my head against this for days.

I even tried to install it on a Win 10 VM (but had other issues, Docker does not seem to like being a Virtual on a Virtual (well not on Hyper-V anyway).

One question. I have to edit the yml files to set the version to 3.3 (from 3.7) have I installed an old version of Docker on the Pi in error? Not sure how as I followed the instructions from here https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script

Anyway, thanks again

Cosma

CosmaP avatar Jul 03 '21 20:07 CosmaP

Hi there @mcpeixoto , I had the same problem.

I got this error:

$ docker-compose -f docker-compose-dev.yml build
ERROR: Version in "./docker-compose-dev.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

Using docker-compose version 1.21.0 and rasbian

I fixed mine by editing the yml files and changed the line at the top that says

version: "3.7"

to say

version: "3.3"

That worked for me.

Cosma

CosmaP avatar Jul 03 '21 21:07 CosmaP

@Cladex on your fifth step I'm getting: Error response from daemon: Container 74a07de730fb0ff0dfe155udoffcndoc20fe03a96590105096382f123f3469 is restarting, wait until the container is running.

How long do I need to wait as it's been 5 minutes?

Meep1122131313 avatar Mar 15 '23 21:03 Meep1122131313