netprobe_lite
netprobe_lite copied to clipboard
Add Portrainer support and multi arch build pipeline
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 includingAMD64
,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 aDockerfile 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 topython
projects. - In the
Dockerfile
theMAJOR.MINOR
python version can be set via$PYTHON_VERSION
more info inbuild.env
- With these changes the project can be deployed in
Portrainer
even under armlinux
. - For local build using
docker-compose.yml
anddocker-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 deployingPortrainer
, used wrong image file on linux. - Be sure that
entrypoint.sh
has executable permission. -
Config_Netprobe.speedtest_enabled
is considered innetprobe_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 toFalse
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 usingPortrainer
, more info in theREADME.md
Recommended subject around the topic:
- https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/