Kirby, Docker & ImageMagick

I’m running a Kirby site on Fly inside Docker and need to use ImageMagick for GIF support.

I added apt-get install imagemagick to my Dockerfile, but apparently this installs ImageMagick 6 without AVIF support that breaks the Kirby site.

Does anyone know what’s the best way to install ImageMagick 7 with AVIF support inside a Ubuntu 22-based Docker Image?

Guess you will have to build from source, which is a bit more complicated. What about newer versions of Ubuntu? Or are you bound to LTS?

It’s is the official PHP docker base image I’m using; (fideveloper) I could do something entirely custom if it’s my only option but was hoping to avoid that.