Created
January 15, 2019 14:22
-
-
Save rnestertsov/6cd40fe0632f86d3bba36d8f8e27416b to your computer and use it in GitHub Desktop.
Build docker image with java / maven / node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM centos:7.5.1804 | |
| ARG JDK_VERSION | |
| ARG MAVEN_VERSION | |
| ARG NODE_VERSION | |
| RUN yum install -y \ | |
| wget \ | |
| java-${JDK_VERSION}-openjdk-devel | |
| ENV JAVA_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk/ | |
| RUN wget https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | |
| RUN mkdir -p /opt/apache-maven | |
| RUN tar --strip-components 1 -xzvf apache-maven* -C /opt/apache-maven | |
| ENV M3_HOME=/opt/apache-maven | |
| ENV M3=$M3_HOME/bin | |
| ENV PATH=$M3:$PATH | |
| RUN mkdir -p /opt/nodejs | |
| RUN wget https://nodejs.org/dist/latest-v10.x/node-v${NODE_VERSION}-linux-x64.tar.gz | |
| RUN tar --strip-components 1 -xzvf node-v* -C /opt/nodejs | |
| ENV NODEJS=/opt/nodejs/bin | |
| ENV PATH=$NODEJS:$PATH | |
| RUN mkdir -p /home/jenkins | |
| RUN chown -R 1000:1000 /home/jenkins | |
| WORKDIR /home/jenkins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment