diff --git a/scripts/Dockerfile b/scripts/Dockerfile index ea16cda951b11d180e35cd4a2b13f9af4f7d38b9..0961d5bf176f4a32f8a59a9b0ec75a18ec53e2de 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -1,4 +1,3 @@ -FROM gradle:4.7.0-jdk8-alpine AS build FROM debian:latest @@ -12,6 +11,76 @@ RUN update-alternatives --install /usr/bin/python \ RUN apt-get install build-essential -y --no-install-recommends +RUN apt-get update; apt-get install -y wget + +RUN wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz" -O jdk-8-linux-x64.tar.gz +RUN tar xzf jdk-8-linux-x64.tar.gz; mkdir -p /opt/java; mv jdk1.8.0_131 /opt/java; ln -s /opt/java/jdk1.8.0_131 /opt/java/latest; ln -s /opt/java/latest /opt/java/default + +# JDK stripping +RUN rm -f /opt/java/jdk1.8.0_131/src.zip /opt/java/jdk1.8.0_131/javafx-src.zip +RUN rm -rf /opt/java/jdk1.8.0_131/lib/missioncontrol/ /opt/java/jdk1.8.0_131/lib/visualvm/ /opt/java/jdk1.8.0_131/db/ + +RUN update-alternatives --install /usr/bin/java java /opt/java/latest/bin/java 1 +RUN update-alternatives --install /usr/bin/javac javac /opt/java/latest/bin/javac 1 + +ENV JAVA_HOME /opt/java/latest +ENV PATH $PATH:$JAVA_HOME/bin + +CMD ["gradle"] + +ENV GRADLE_HOME /opt/gradle + +RUN set -o errexit -o nounset \ + && echo "Adding gradle user and group" \ + && groupadd --system --gid 1000 gradle \ + && useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \ + && mkdir /home/gradle/.gradle \ + && chown --recursive gradle:gradle /home/gradle \ + \ + && echo "Symlinking root Gradle cache to gradle Gradle cache" \ + && ln -s /home/gradle/.gradle /root/.gradle + +VOLUME /home/gradle/.gradle + +WORKDIR /home/gradle + +RUN apt-get update \ + && apt-get install --yes --no-install-recommends \ + fontconfig \ + unzip \ + wget \ + \ + bzr \ + git \ + git-lfs \ +&& echo "Testing VCSes" \ + && which bzr \ + && which git \ + && which git-lfs + +RUN apt-get update \ + && apt-get install --yes --no-install-recommends \ + openssh-client + +ENV GRADLE_VERSION 6.9 +ARG GRADLE_DOWNLOAD_SHA256=f581709a9c35e9cb92e16f585d2c4bc99b2b1a5f85d2badbd3dc6bff59e1e6dd +RUN set -o errexit -o nounset \ + && echo "Downloading Gradle" \ + && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ + \ + && echo "Checking download hash" \ + \ + && echo "Installing Gradle" \ + && unzip gradle.zip \ + && rm gradle.zip \ + && mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ + \ + && echo "Testing Gradle installation" \ + && /opt/gradle/bin/gradle --version + +ENV PATH="/opt/gradle/bin:${PATH}" + +RUN rm -rf /var/lib/apt/lists/* diff --git a/scripts/eval.sh b/scripts/eval.sh index 1b1c24a44c318e072d27328fd8a16b5d437d8a58..b64d68d0eead69776f63e1d3771a858e749fed9b 100755 --- a/scripts/eval.sh +++ b/scripts/eval.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash printf 'testing\n' - make noguitest if [ $? -eq 0 ]; then