Graylog2 / graylog-docker

Official Graylog Docker image
https://hub.docker.com/r/graylog/graylog/
Apache License 2.0
361 stars 133 forks source link

Provide image for arm64 architecture #163

Closed der-eismann closed 3 years ago

der-eismann commented 3 years ago

As more and more platforms with an arm64 architecture enter the market (AWS m6g instances, Apple M1 machines) it would be nice to have a compatible docker image for Graylog. There are ways to emulate arm64 on x86 with Docker to build multiarch images.

dcalano commented 3 years ago

Also second for arm64, want to use Graylog for an arm64 NAS device for centralized logging.

malcyon commented 3 years ago

I've experimented with this a bit today, and I have it building for arm64 locally on my laptop. But it seems like Docker Hub, which we use to build our Graylog image, doesn't support ARM builds.

https://github.com/docker/roadmap/issues/109

We might have to use Jenkins or Github Actions for this.

phantomski77 commented 3 years ago

I've done a little provisional work around this problem here if you're interested: https://hub.docker.com/repository/docker/phantomski/graylog It's a static build of course at the moment (+ repo with modified Dockerfile), but I'm using it for a while without issues, steadily updating and improving it with the latest compatible dependencies.

Official automated build version would be great of course, but this works for now (rPi4), potentially also on other arm64 architecture systems.

malcyon commented 3 years ago

That's cool! For the record, here's what I'm running locally. I'm on Ubuntu 20.04 (x86_64).

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --name multiarch --driver docker-container --use
docker buildx inspect --bootstrap
docker build --platform linux/arm64/v8,linux/amd64 --no-cache --build-arg GRAYLOG_VERSION=4.1.0 --tag d1morto/graylog-test:multiarch-latest --file $HOME/src/graylog-docker/docker/oss/Dockerfile --push .

Then if I check the manifest:

donald@laptop:~/src/graylog-docker$ docker manifest inspect d1morto/graylog-test:multiarch-latest
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2838,
         "digest": "sha256:831f682198c0393f968b4cbacdd5f480bfe5d05f6b73a87666ea8a0da3986757",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2838,
         "digest": "sha256:ef0544c55f2b3c8121ed2052e4c946efa19aee1f5290871c82bbe1e90fdbf31d",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      }
   ]
}

That is just me experimenting manually, though. I'll have to figure out how to handle the automated build.

malcyon commented 3 years ago

Okay, I've published an arm64 image to the official Docker Hub repo.

I did not change our official image into a multiarch image. The arm64 version is just available with it's own separate tag for now.

Let me know if you run into any issues with it.