Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 820
Udhaya Avatar asked Jan 25 '23 11:01

Udhaya


2 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 :)

like image 23
Ashutosh Tiwari Avatar answered Feb 05 '23 16:02

Ashutosh Tiwari


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
like image 155
koolwithk Avatar answered Feb 05 '23 15:02

koolwithk