Must-share information (formatted with Markdown):
- which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
- how is SonarQube deployed: zip
- what are you trying to achieve : Trying to build a docker image of linux based sonar-scanner(cli) to run in CI pipeline hosted on S390x architecture
- what have you tried so far to achieve this : I have tried to build the image but not able to generate
FROM alpine:3.19 AS builder
ARG SONAR_SCANNER_HOME=/opt/sonar-scanner
ARG SONAR_SCANNER_VERSION='6.0.0.4432'
RUN mkdir ${SONAR_SCANNER_HOME} -p
RUN cd /opt/sonar-scanner
WORKDIR /opt/sonar-scanner/sonar-scanner-6.0.0.4432-linux
RUN pwd
RUN apk update && apk add zip
RUN mkdir /downloads/sonarqube -p \
&& cd /downloads/sonarqube \
&& wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.0.0.4432-linux.zip \
&& unzip sonar-scanner-cli-6.0.0.4432-linux.zip \
&& rm sonar-scanner-cli-6.0.0.4432-linux.zip \
# && mv sonar-scanner.properties /opt/sonar-scanner/conf/sonar-scannr.properties \
&& mv sonar-scanner-${SONAR_SCANNER_VERSION}-linux ${SONAR_SCANNER_HOME} \
&& pwd \
# && mkdir /opt/sonar-scanner/sonar-scanner-6.0.0.4432-linux/jre
RUN pwd
WORKDIR /opt/sonar-scanner/sonar-scanner-6.0.0.4432-linux/jre
RUN ln -s /opt/sonar-scanner/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin/sonar-scanner /usr/local/bin/sonar-scanner \
&& echo 'export PATH="$PATH:/opt/sonar-scanner/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin"' >> ~/.bashrc \
&& source ~/.bashrc
CMD ["sonar-scanner -v"]