internet-speed-logger
internet-speed-logger copied to clipboard
Feature request: Raspberry Pi / ARM compiled containers
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.
👍
That's a fantastic idea! Thank you! I'll track it here - it should be pretty straight forward to make it happen 👍
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.
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
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 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 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
@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
- git clone --single-branch --branch armv7 https://github.com/timwsuqld/internet-speed-logger.git
- cd internet-speed-logger
- docker-compose -f docker-compose-dev.yml build
- docker-compose up -d
- sudo docker exec -it internet-speed-logger_mongo_1 mongo admin
Now Inside MangoDB
- use speedtest
- db.createUser({ user: "speedtest", pwd: "speedtest", roles: [{ role: "dbOwner", db: "speedtest" }] })
- exit
Back In Pi User (not sure if you need to restart the speed test containers but I did for good measure)
- docker restart internet-speed-logger_speedlogger-runner_1
- 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
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?
@Cladex thank you very much for your step by step guide. it worked like a charm!
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
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
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
@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?