Skip to content

Instantly share code, notes, and snippets.

@tomardern
Last active April 12, 2022 18:07
Show Gist options
  • Save tomardern/26a3f44a314ed5a62b674bbce5fb0730 to your computer and use it in GitHub Desktop.
Save tomardern/26a3f44a314ed5a62b674bbce5fb0730 to your computer and use it in GitHub Desktop.
SonarQube & Sonar-Scanner on Apple M1

First get the container ID: docker ps (First column is for container ID)

Use the container ID to run: docker inspect <container id> | grep "IPAddress"

In another terminal window:

docker run \
  --rm \
  --name sonar-cli \
  --platform linux/amd64 \
  -e SONAR_HOST_URL="{enter ip of docker container running sonarqube" \
  -e SONAR_LOGIN="{enter token here}" \
  -v "{local directory}:/usr/src" \
  nancom/sonar-scanner-m1 \
  -Dsonar.projectKey="{project name or key}" \
  -Dsonar.verbose=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment