canonical / nrpe_exporter

Apache License 2.0
49 stars 18 forks source link

Added in-docker multi-stage build to make it easier to run on Docker #17

Closed hoijnet closed 2 years ago

hoijnet commented 4 years ago

The current build instructions expects the implementer to have a local Golang installation. To make it easier to start the image in Docker on a server without a Golang installation, the Dockerfile was updated to add a build step.

In the hope it's helpful.

All the best//Philippe

brian-brazil commented 4 years ago

Can you make this consistent with https://github.com/RobustPerception/azure_metrics_exporter ?

hoijnet commented 4 years ago

Thanks for the reference, it looks like a really neat solution.

I quickly ran into the issue of SSL support myself and made an initial Dockerfile based upon ubuntu 1604. Thinking that it is what most people would likely need, do you think it makes sense to use a modern go, but base the SSL upon static linking with ubuntu 1604 libraries?

I think it makes more sense, but will not be as clean. Looking into it though!

brian-brazil commented 4 years ago

That sounds reasonable to me, given we're using such outdated SSL protocols the age of the distro doesn't really matter.

hoijnet commented 4 years ago

I added a Makefile as per azure_metrics_exporter and made the static build using ubuntu16.04. Unsure if it is what you mean with consistency with azure_metrics_exporter?

I tried locally and it was successful with an SSL NRPE endpoint as expected.

Could you unpack the "consistency" for me if I misunderstood? :-)

brian-brazil commented 4 years ago

The dockerfiles should be as similar as possible, so for example they should be using the same base images, same target names, same structure etc.

simskij commented 2 years ago

Closing this as it's quite aged and the original author seems to not need it anymore.