Skip to content

Conversation

Xian55
Copy link

@Xian55 Xian55 commented May 20, 2024

Hello, good day. I just wanted to let you know that, i've managed to make the project deployable in Portrainer under arm32v7 arch.

I had to do some major reorganizing changes in order to make this happen. I think in the long term the project certainly benefits from it.

You may accept or deny this PR. My only goal was to make the project working on my small arm based odroid xu4, which runs 24/7 runs on very low power.
However i highly suggest to check out my changes in order to understand what kind of changes needed to be made for Portrainer Stack support.

I wish for the best moving forward with the project, i really like the idea not to mention its quite handy when your ISP doing questionable things.

Changes:

  • Create a build pipeline(build_publish.sh) for making multi arch manifest including AMD64, ARM32V7, ARM64V8 result can be seen here.
  • Reorganized the project to better use Dockerfile COPY. Moved all of the source does under the /src folder.
  • docker-compose.yml no longer mounts the source code into the container directly but rather creates a Dockerfile COPY of the /src folder.
  • Maintainability reasons, docker-compose.yml no longer mounts single files, but rather mounts the parent folder.
  • Added more syntax highlight to the README.md file.
  • Added .dockerignore to the project specific to python projects.
  • In the Dockerfile the MAJOR.MINOR python version can be set via $PYTHON_VERSION more info in build.env
  • With these changes the project can be deployed in Portrainer even under arm linux.
  • For local build using docker-compose.yml and docker-compose.override.yml.
  • Added the ability to build multiple arch and python version number in Dockerfile.
  • Fixed an issue where no entrypoint.sh found while deploying Portrainer, used wrong image file on linux.
  • Be sure that entrypoint.sh has executable permission.
  • Config_Netprobe.speedtest_enabled is considered in netprobe_speedtest.py
  • Added custom logging alias for /logs folder - volume can be mounted so the logs are persisted on the host machine.
  • if Config_Netprobe.speedtest_enabled is set to False the speedtest container spins up and exists immediately.
  • Updated readme.md for how to build and publish docker image to docker hub.

Tested my changes:

  • Windows 10 - the windows developer experience did not changed much. Using the following command docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build this should give more flexibility what kind of customization each consumer want to implement.
  • Linux Debian 10 buster - arm32v7 - deploying the app using Portrainer, more info in the README.md

Recommended subject around the topic:

* Create a build pipeline for making multi arch manifest including AMD64, ARM32V7, ARM64V8.
* Reorganized the project to better use Dockerfile COPY.
* With these changes the project can be deployed in Portrainer even under arm linux.
* For local build using docker-compose and docker-compose.override
* Added the ability to build multiple arch and python version number in Dockerfile
* Fixed an issue where no entrypoint.sh found while deploying Portrainer
* Be sure that entrypoint.sh has executable permission
@Xian55 Xian55 changed the title Add Portrainer Support to the project Add Portrainer support and multi arch build pipeline May 20, 2024
@plaintextpackets
Copy link
Owner

Thank you will dig into this and get back to you

@Xian55
Copy link
Author

Xian55 commented May 23, 2024

Gooday!

Take your time.

After looking back, its not my cleanest PR but the gist of it should give all the major points what kinds of improvements can be made.

If you have any questions feel free to ask and challenge me.

@plaintextpackets
Copy link
Owner

Are you available on Discord to chat about the PR?

@Xian55
Copy link
Author

Xian55 commented Jun 2, 2024

hi, yes sure.

@Bouni
Copy link

Bouni commented Jan 28, 2025

This PR adresses a lot of things that I would change in a similar way after setting up netprobe. It absolutely works as it is, but its far from a good experiance.
Especially that the non config files (netprobe_speedtest.py, netprobe.py, etc. ) are not poart of the docker container is strange.

Please take another look at this PR and concider merging it.

Last but not least, nice project 🤩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants