1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- # FROM openjdk:11 as builder
- FROM openjdk:8 as builder
- ARG MAVEN_VERSION=3.9.5 \
- GRADLE_VERSION=7.3.3
- ARG GRADLE_DOWNLOAD_SHA256=98bd5fd2b30e070517e03c51cbb32beee3e2ee1a84003a5a5d748996d4b1b915
- # # install gradle
- RUN set -o errexit -o nounset \
- && echo "Downloading Gradle" \
- && wget -q "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" -P /tmp/gradle.zip \
- \
- && echo "Checking download hash" \
- && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum -c - \
- \
- && echo "Installing Gradle" \
- && unzip -d /opt/gradle /tmp/gradle-*.zip && rm -rf /tmp/gradle-*.zip \
- && ln -s "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle
- ENV GRADLE_HOME=/opt/gradle/gradle-${GRADLE_VERSION}
- ENV PATH=$PATH:$GRADLE_HOME/bin
- # install maven
- RUN set -o errexit -o nounset \
- && echo "Downloading Maven" \
- && wget -q "https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.zip" -P /tmp \
- \
- && echo "Installing Maven" \
- && unzip -d /opt/maven /tmp/apache-maven-*.zip && rm -rf /tmp/apache-maven-*.zip \
- && ln -s "${MAVEN_HOME}/bin/mvn" /usr/bin/mvn
- ENV MAVEN_HOME=/opt/maven/apache-maven-${MAVEN_VERSION}
- ENV PATH=$PATH:$MAVEN_HOME/bin
- LABEL email="liuyuqi<liuyuqi.gov@msn.cn>"
- WORKDIR /workspaces
- # RUN mvn package
- VOLUME [ "/workspaces" ]
- ENV USER_HOME_DIR="/home/gradle"
- ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"
- CMD [ "/bin/bash" ]
|