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

6

15

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?

Kesley answered 4/3, 2021 at 19:51 Comment(1)
Default sonarqube is not supported for arm64, and not found in docker hub. How about try using this: amd64/sonarqubeTemplar
D
32

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
Duyne answered 14/1, 2022 at 10:14 Comment(4)
thanks by the way for iniatively build the M1 imagePersse
I just want to mention I face an issue with run sonarqube-arm image, but I fix it by running the previous command as sudo: sudo docker run -d -p 9000:9000 sonarqube-armCoster
it needs the build path also so try docker build ./ -t sonarqube-armParticolored
build path is already passed at the end as dotDuyne
F
30

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

Flamsteed answered 13/6, 2021 at 13:25 Comment(4)
No, you can not run with --platform linux/x86_64. it's based on arm64 architectureDuyne
I am already doing it so...^Flamsteed
Just found out It's running on amd64 qemu emulation which won't give you best efforts. You will lose some performance and may drain your battery. You can also look into known issue here - docs.docker.com/desktop/mac/apple-siliconDuyne
You can build your own docker image on M1 chip OR use already created arm64 docker image. I have added answer how you can do both.Duyne
U
5

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
Uniformitarian answered 23/2, 2022 at 12:41 Comment(0)
L
0

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.

Lobell answered 4/3, 2021 at 20:2 Comment(1)
Thanks for your response @bmitch I tried the same and it didn't work for me. Found this from the SonarSource Community - jira.sonarsource.com/browse/CPP-2882 community.sonarsource.com/t/apple-silicon-issue/38774Kesley
C
0

You can use this image it's works

mwizner/sonarqube

Calices answered 30/9, 2022 at 18:39 Comment(3)
Error response from daemon: manifest for mwizner/sonarqube:latest not found: manifest unknown: manifest unknownMcgannon
@Mcgannon I think you must add the version you want. E.g : mwizner/sonarqube:9.4.0-communityNowicki
@snoobdogg, Thx, it might help others with same issue (although I think I tried it..not sure!). Finally went for koolwithk's answer below which worked perfect for me.Mcgannon
C
0

Try to use colima it's easy form to use docker with other plataforms

To install

brew install colima

To use before start docker container

colima start --arch x86_64 --memory 4

docker run ...

To after use stop

colima stop
Cytogenesis answered 5/5, 2023 at 14:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.