MindFlavor / prometheus_wireguard_exporter

A Prometheus exporter for WireGuard, written in Rust.
https://mindflavor.github.io/prometheus_wireguard_exporter
MIT License
493 stars 51 forks source link

provide docker image #36

Closed poblin-orange closed 4 years ago

poblin-orange commented 4 years ago

Your exporter is very interesting. However, rust runtime is not easy to set up. An image, maybe based on official https://hub.docker.com/_/rust would be valuable. Would extend possible usage on docker and k8s

MindFlavor commented 4 years ago

It's an excellent idea. We will need to make sure the container could spawn wg show <interface> dump on the host (or even another container). Maybe prebuilt binaries can help here as well.

poblin-orange commented 4 years ago

Sure. Rust on Dockerfile might be complex to set up, but once done, its easy to pushlish the image on dockerhub from github.

Maybe the kilo project could be used as inspiration with wg binary integration . https://github.com/squat/kilo

They consider wireguard must be preinstalled on host vms, and i guess they allow priviliged access to the host binary.

qdm12 commented 4 years ago

See #39. We just need to setup a CI pipeline (I'm familiar with it using Github actions) to build and push the Docker image to a Docker Hub account.

poblin-orange commented 4 years ago

@qdm12 @MindFlavor i guess we can close this. One (probly stupid) question: is the resulting image built and uploaded to dockerhub ? I cant find it :-(

qdm12 commented 4 years ago

Uh no sorry for postponing this. I'll try to add the CI now to automatically push to Docker hub.

qdm12 commented 4 years ago

Actually I just realized, my CI PR has already been merged. Unfortunately, I made a typo to build from the master branch, so I made another PR. That should build and push the image once it's merged.

qdm12 commented 4 years ago

@MindFlavor can you try pushing to master (anything really, even a PR should work) to trigger the buildx-latest workflow for the first time? Thanks!