From 188c9ef67f14b2368b2251f1469a2dcb34cfa37f Mon Sep 17 00:00:00 2001 From: Gabriele Iannetti Date: Thu, 24 Nov 2022 11:21:42 +0100 Subject: [PATCH] Update README.md for Building RPM Package --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index ad580cf..e3725a8 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,29 @@ You can build a Docker container with the included `docker` make target: This will not even require Go tooling on the host. See the included [docker compose example](docker-compose.yml) for how to use the resulting container. +### Building RPM Package + +The RPM package build targets to run the exporter locally with sudo permissions to expose most metrics. + +#### Directly on CentOS with rpmbuild + +Build script is located in `rpm/build.sh`. + +The RPM package will be available under `$HOME/rpmbuild/`. + +#### Docker Build Container + +The build container uses CentOS7. + +```bash +# from repo base dir run + +sudo docker build -t rpm_dock -f docker/RPM-Dockerfile . +sudo docker run -v $PWD:/rpm -it rpm_dock +``` + +The RPM package will be available under `build/`. + ## Running A minimal invocation looks like this: