Dockerfile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ######################
  2. ## Dockerfile to build container images consisting of Node.js and nginx environment
  3. # Based on Ubuntu
  4. #####
  5. # Set the base image to Ubuntu
  6. FROM ubuntu
  7. # File Author / Maintainer
  8. # MAINTAINER name Chunteng Xiao
  9. RUN apt-get clean
  10. RUN apt-get update
  11. RUN apt-get install -y software-properties-common
  12. RUN add-apt-repository ppa:webupd8team/java
  13. RUN apt-get update
  14. RUN apt-get -f install -y curl unzip wget
  15. RUN apt-get -y install oracle-java8-installer
  16. RUN apt-get -y install oracle-java8-set-default
  17. RUN curl --insecure -o ./sonarscanner.zip -L https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227-linux.zip
  18. RUN unzip sonarscanner.zip
  19. RUN rm sonarscanner.zip
  20. ENV SONAR_RUNNER_HOME=/sonar-scanner-3.2.0.1227-linux
  21. ENV PATH $PATH:/sonar-scanner-3.2.0.1227-linux/bin
  22. RUN wget http://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.10/bin/apache-tomcat-9.0.10.tar.gz
  23. RUN tar xzf apache-tomcat-9.0.10.tar.gz
  24. RUN mv apache-tomcat-9.0.10 apache-tomcat9
  25. RUN wget http://www-eu.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
  26. RUN tar xzvf apache-maven-3.5.4-bin.tar.gz
  27. RUN ln -s apache-maven-3.5.4 apache-maven
  28. ENV M2_HOME=/usr/local/apache-maven
  29. ENV CATALINA_HOME=/usr/local/apache-tomcat9
  30. ENV TOMCAT_HOME=/usr/local/apache-tomcat9
  31. ENV MAVEN_HOME=/usr/local/apache-maven
  32. ENV PATH=${M2_HOME}/bin:${PATH}
  33. ENV JAVA_HOME=/usr/lib/jvm/java-8-oracle
  34. ENV JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
  35. ADD ca.crt ./
  36. RUN keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias maven2.ca -file ca.crt
  37. RUN keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/jssecacerts -storepass changeit -noprompt -alias maven2.ca -file ca.crt
  38. RUN mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.2.0.1.0 -Dpackaging=jar -Dfile=./additional_jars/ojdbc7.jar
  39. COPY sonar-runner.properties ./sonar-scanner-3.2.0.1227-linux/conf/sonar-scanner.properties
  40. EXPOSE 84
  41. EXPOSE 8080