如何在Docker Ubuntu上设置SonarQube主变量

时间:2018-05-23 07:21:32

标签: docker sonarqube

我想运行Jenkins构建并在SonarQube中显示结果,两者都已安装,但我不知道设置Sonar home变量。有人可以帮忙吗?

这是我的泊坞文件

FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y  software-properties-common && \
    add-apt-repository ppa:webupd8team/java -y && \
    apt-get update && \
    echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
    apt-get install -f -y oracle-java8-installer && \
    apt install -y curl wget git maven supervisor unzip; \
    apt-get clean
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $JAVA_HOME/bin:$PATH
ENV M2_HOME /usr
ENV PATH $M2_HOME/bin:$PATH
RUN mkdir -p ~/.m2
COPY jenkins.war /opt/jenkins.war
RUN chmod 644 /opt/jenkins.war
ENV JENKINS_HOME /jenkins
COPY sonarqube.zip /tmp/
RUN unzip /tmp/sonarqube.zip
EXPOSE 9000
ENTRYPOINT ["java", "-jar", "/opt/jenkins.war"]
RUN mkdir /jenkins
RUN echo 2.107.2 > jenkins/jenkins.install.UpgradeWizard.state
RUN echo 2.107.2 > jenkins/jenkins.install.InstallUtil.lastExecVersion
RUN mkdir /jenkins/plugins
COPY proxy.xml /jenkins/proxy.xml
COPY config.xml /jenkins/config.xml 
COPY hudson.tasks.Maven.xml /jenkins/hudson.tasks.Maven.xml
COPY settings.xml /usr/share/maven/conf/settings.xml 

0 个答案:

没有答案