saphoooo / freebox_exporter

A prometheus exporter for freebox stats
Apache License 2.0
52 stars 26 forks source link

[Docker] ARM images are not labelized correctly (docker Hub) #45

Open Lunik opened 4 years ago

Lunik commented 4 years ago

Hi,

According to the docker hub repository of the image, ARM images are flagged as "linux/amd64".

Even if you can technically run thoses images on arm (ex: raspberry-pi), when dealing with Docker swarm it doesn't work. Docker Swarm look for the image architecture in the image metadata for scheduling container. You get :

"Placement": {
  "Platforms": [
    {
      "Architecture": "amd64",
      "OS": "linux"
     }
  ]
},

And then, the container will never spawn...

If you can't do it with the Docker Hub autobuild, you can make few by hand commands:

docker buildx build --platform=linux/arm/v7 . -f Dockerfile-armv7 -t saphoooo/freebox-exporter:v1.3.1-armv7
docker push saphoooo/freebox-exporter:v1.3.1-armv7

sources : https://www.docker.com/blog/multi-arch-images/

saphoooo commented 4 years ago

I try as mush as possible to avoid toil in this phase, so manual isn't an option (after all, all source code and Dockerfiles sits on Github). But, well, maybe I can try something: https://hub.docker.com/r/ckulka/multi-arch-example. Maybe this solution can resolve the issue.