Docker (Apple Silicon/M1 Preview) sonarqube “no matching manifest for linux/arm64/v8 in the manifest list entries”

Viewed 13545

Here is my YAML file.

file name - docker-compose.mysonar.yml

version: '2'
services:
    my-sonar:
        image: sonarqube:7.1
        ports:
            - 9001:9000

when I run docker-compose -f docker-compose.mysonar.yml up it throws the error - “no matching manifest for linux/arm64/v8 in the manifest list entries”

How do I fix this?

4 Answers

--platform linux/x86_64

Use this flag above for the commands where things are not working.

For eg.

docker run --platform linux/x86_64 sonarqube 

Hope it helps :)

Apple M1 chips are ARM based architecture. When we run docker with --platform linux/x86_64 option It's run on qemu emulation which won't give us the best performance. To get more information look at docker apple-silicon docs.

To get native performance of M1 chip you can do as below.

  1. Build your own sonarqube image from Sonarqube Dockerfile on Applie slicon.
git clone https://github.com/SonarSource/docker-sonarqube
cd docker-sonarqube/9/community

#build
docker build -t sonarqube-arm .

#run
docker run -d -p 9000:9000 sonarqube-arm

OR

  1. You can use ARM based sonarqube docker image which I built recently on AWS ARM based server.
docker run -d -p 9000:9000 koolwithk/sonarqube-arm:9.2.4-community

Just add this platform in the docker-compose.yml file as shown below

platform: linux/amd64

docker-compose.yml

version: '2'

services:
  my-sonar:
      image: sonarqube:7.1
      platform: linux/amd64
      ports:
        - 9001:9000

All of the images in that repo have a single manifest in the manifest list for linux/amd64. You can try pulling the sha for that directly to see if it runs with virtualization. That tag for 7.1 is currently:

sonarqube@sha256:e36dcf59f4da62694a6e8265e6c56ca18596f59880f4cb6dd2c9efc6e0022405

Otherwise you could try to build the image for your platform, however the upstream image seems to indicate this is not supported and that they won't fix it for the M1's either.

Related