Dockerfile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
  16. RUN apt-get install -y oracle-java8-installer
  17. RUN apt-get install -y oracle-java8-set-default
  18. RUN curl --insecure -o ./sonarscanner.zip -L https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227-linux.zip
  19. RUN unzip sonarscanner.zip
  20. RUN rm sonarscanner.zip
  21. ENV SONAR_RUNNER_HOME=/sonar-scanner-3.2.0.1227-linux
  22. ENV PATH $PATH:/sonar-scanner-3.2.0.1227-linux/bin
  23. RUN wget http://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.10/bin/apache-tomcat-9.0.10.tar.gz
  24. RUN tar xzf apache-tomcat-9.0.10.tar.gz
  25. RUN mv apache-tomcat-9.0.10 apache-tomcat9
  26. RUN wget http://www-eu.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
  27. RUN tar xzvf apache-maven-3.5.4-bin.tar.gz
  28. RUN ln -s apache-maven-3.5.4 apache-maven
  29. ENV M2_HOME=/usr/local/apache-maven
  30. ENV CATALINA_HOME=/usr/local/apache-tomcat9
  31. ENV TOMCAT_HOME=/usr/local/apache-tomcat9
  32. ENV MAVEN_HOME=/usr/local/apache-maven
  33. ENV PATH=${M2_HOME}/bin:${PATH}
  34. ENV JAVA_HOME=/usr/lib/jvm/java-8-oracle
  35. ENV JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
  36. ADD ca.crt ./
  37. ADD ./additional_jars ./
  38. RUN keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias maven2.ca -file ca.crt
  39. RUN keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/jssecacerts -storepass changeit -noprompt -alias maven2.ca -file ca.crt
  40. RUN mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.2.0.1.0 -Dpackaging=jar -Dfile=./additional_jars/ojdbc7.jar
  41. COPY sonar-runner.properties ./sonar-scanner-3.2.0.1227-linux/conf/sonar-scanner.properties
  42. EXPOSE 84
  43. EXPOSE 8080