line / promgen

Promgen is a configuration file generator for Prometheus
https://line.github.io/promgen/
MIT License
1.06k stars 150 forks source link

arm64 or armhf version #438

Open Bluscream opened 1 year ago

Bluscream commented 1 year ago

Is there a version that runs on raspberry pi?

kfdm commented 1 year ago

It's Python and we are not doing anything too complicated so I would imagine it should run on raspberry pi, though I'm not sure we have the bandwith to test it ourselves.

Bluscream commented 1 year ago

the problem is that it's compiled for amd64

docker run --rm -it -v ~/.config/promgen:/etc/promgen/ line/promgen createsuperuser
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /docker-entrypoint.sh: exec format error
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /docker-entrypoint.sh: exec format error
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /docker-entrypoint.sh: exec format error
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /docker-entrypoint.sh: exec format error
kfdm commented 1 year ago

In that case, you should try building your own docker container. Clone the repo and there is a make build target for the docker container.

Bluscream commented 1 year ago

i will try that, thank you. can i add the built container to your dockerhub?

kfdm commented 1 year ago

Yeah, it's possible an arm version could be built from https://github.com/line/promgen/blob/master/.github/workflows/docker.yml

I've only done a very quick, basic search but this suggests it might be easy to do https://dev.to/cloudx/multi-arch-docker-images-the-easy-way-with-github-actions-4k54

      - name: Build and push
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64,linux/arm/v7
          push: ${{ github.event_name != 'pull_request' }}
          tags: ${{ steps.<meta_id>.outputs.tags }}
          labels: ${{ steps.<meta_id>.outputs.labels }}