Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.34k stars 699 forks source link

Provide multi-arch official docker images #536

Closed strelok1 closed 2 years ago

strelok1 commented 2 years ago

Describe the bug

Official images are only linux/amd64. When run on an M1 Mac or another ARM host you get a warning:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

It should be possible to build multi-arch images using docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 ...

How to reproduce the problem

$ docker pull clamav/clamav
$ docker manifest inspect --verbose clamav/clamav

Only one manifest entry for linux/amd64

image

If I build an image from the Dockerfile in this repo with a recent build of Docker for Mac, for example, a multi-arch image is created that can be run on M1 Macs and other ARM arch hosts, such as latest generation cloud instances from all the major cloud providers:

image
micahsnyder commented 2 years ago

This feels like a duplicate of https://github.com/Cisco-Talos/clamav/issues/482

Your recommendation on how to do the build will be useful for us to modify our build tooling in Jenkins. If you have any further clarification on how to run the buildx command, the details will be helpful.