feat: add gradle version 6.8-rc-5; default to bash
All checks were successful
continuous-integration/drone/push Build is passing

* in alpine, ash is the default shell, this commit changes that
* add gradle via asdf. this speeds up build times as this image is being
  used in ci and now that gradle is a part of the package, it doesn't
  have to be downloaded at the beginning of each pipeline running
  './gradlew ...'
This commit is contained in:
surtur 2021-01-14 21:59:54 +01:00
parent e38b189c88
commit 0dbe7e44a1
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -50,9 +50,25 @@ ENV JAVA_OPTS='-XX:+UseContainerSupport -XX:MaxRAMPercentage=80'
ENV ANDROID_HOME "/sdk" ENV ANDROID_HOME "/sdk"
ENV ANDROID_SDK_ROOT "${ANDROID_SDK_ROOT}" ENV ANDROID_SDK_ROOT "${ANDROID_SDK_ROOT}"
ENV PATH "$PATH:${ANDROID_SDK_ROOT}/tools:${ANDROID_HOME}/tools" ENV PATH "$PATH:${ANDROID_SDK_ROOT}/tools:${ANDROID_HOME}/tools"
ENV ASDF_VERSION "v0.6.3"
ENV GRADLE_VERSION "6.8-rc-5"
RUN apk add --no-cache bash curl git vim xz --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing RUN apk add --no-cache bash curl git vim xz --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
# gradle pls
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch ${ASDF_VERSION} \
&& sed -i 's/\/bin\/ash/\/bin\/bash/' /etc/passwd && cat /etc/passwd \
&& echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bashrc \
&& echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc \
&& bash -c ". ~/.bashrc; ~/.asdf/bin/asdf plugin-add gradle https://github.com/rfrancis/asdf-gradle.git" \
&& bash -c ". ~/.bashrc; ~/.asdf/bin/asdf install gradle ${GRADLE_VERSION}" \
&& bash -c ". ~/.bashrc; ~/.asdf/bin/asdf global gradle ${GRADLE_VERSION}" \
&& bash -c ". ~/.bashrc; ~/.asdf/shims/gradle --version"
RUN ln -svf /bin/bash /bin/sh \
&& ls -la /bin/*sh \
&& echo -e "\n. ~/.bashrc" >> ~/.bash_profile
# as per https://github.com/LennonRuangjaroon/alpine-java8-jdk#--remove-spurious-folders-not-needed-like-jrelib # as per https://github.com/LennonRuangjaroon/alpine-java8-jdk#--remove-spurious-folders-not-needed-like-jrelib
RUN rm -rf /opt/jre/lib/plugin.jar \ RUN rm -rf /opt/jre/lib/plugin.jar \
/opt/jre/lib/ext/jfxrt.jar \ /opt/jre/lib/ext/jfxrt.jar \