Install Java in gitpod with sdkman

This commit is contained in:
Yegor Vialov 2020-02-07 09:46:34 +00:00
parent 2bce86f905
commit 1e3bfa8ff7
1 changed files with 2 additions and 8 deletions

View File

@ -4,11 +4,5 @@ ENV ANDROID_HOME=/workspace/android-sdk \
FLUTTER_ROOT=/workspace/flutter \
FLUTTER_HOME=/workspace/flutter
USER root
RUN apt-get update && \
apt-get -y remove openjdk-11-jdk && \
apt-get -y install build-essential libkrb5-dev gcc make gradle openjdk-8-jdk && \
apt-get clean && \
apt-get -y autoremove && \
update-java-alternatives --jre-headless --jre --set /usr/lib/jvm/java-1.8.0-openjdk-amd64
RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \
&& sdk install java 8.0.242.j9-adpt"