Adding on sonar-scanner for SonarQube support
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -1,6 +1,9 @@
|
||||
ARG ARTIFACTORY
|
||||
FROM ${ARTIFACTORY}/podman/stable:latest
|
||||
|
||||
ENV SONAR_SCANNER_VERSION=5.0.1.3006
|
||||
ENV SONAR_SCANNER_HOME=/opt/sonar-scanner
|
||||
|
||||
RUN dnf install -y --nogpgcheck \
|
||||
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
|
||||
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \
|
||||
@@ -23,7 +26,7 @@ RUN dnf install -y podman-docker buildah skopeo \
|
||||
&& dnf install -y azure-cli \
|
||||
&& dnf install -y rpm-build rpm-sign rubygems ruby-devel gcc gcc-c++ make libffi-devel \
|
||||
&& dnf install -y ansible-collection* \
|
||||
&& dnf install -y cpanminus perl-Mojolicious perl-Test-Mojo perl-Test-Harness perl-Carton \
|
||||
&& dnf install -y cpanminus perl-Mojolicious perl-Test-Mojo perl-Test-Harness perl-Perl-Critic perl-Carton \
|
||||
&& dnf clean all \
|
||||
&& rm -rf /var/cache/yum \
|
||||
&& wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq \
|
||||
@@ -32,6 +35,14 @@ RUN dnf install -y podman-docker buildah skopeo \
|
||||
&& mv /tmp/eksctl /usr/bin \
|
||||
&& touch /etc/containers/nodocker
|
||||
|
||||
RUN curl -L -o sonar-scanner.zip \
|
||||
"https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip" && \
|
||||
unzip sonar-scanner.zip -d /opt && \
|
||||
rm -f sonar-scanner.zip && \
|
||||
mv /opt/sonar-scanner* "$SONAR_SCANNER_HOME"
|
||||
|
||||
ENV PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
||||
|
||||
# Adding some Ansible Key and Timeout setting as well as accepting ssh-rsa
|
||||
ENV ANSIBLE_HOST_KEY_CHECKING=False \
|
||||
ANSIBLE_TIMEOUT=120 \
|
||||
|
||||
Reference in New Issue
Block a user