Skip to content

Commit e5d0492

Browse files
committed
remove jenv, only use its download url for java minor version
1 parent ad23ad0 commit e5d0492

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

jdk/8u20/Dockerfile

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ FROM buildpack-deps:bionic-curl
22

33
LABEL maintainer="phithon <root@leavesongs.com>"
44

5-
ENV JAVA_VERSION "1.8.0_20"
5+
ENV JAVA_VERSION="1.8.0_20" JAVA_HOME="/opt/jdk"
66

77
RUN set -ex \
88
&& apt-get update \
99
&& apt-get install -y unzip \
10-
&& curl -L -s get.jenv.io | bash \
11-
&& source /root/.jenv/bin/jenv-init.sh \
12-
&& jenv install java ${JAVA_VERSION} \
10+
&& cd /opt \
11+
&& wget http://get.jenv.mvnsearch.org/download/java/java-${JAVA_VERSION}-x64.zip -O /tmp/java.zip \
12+
&& unzip -q /tmp/java.zip -d /opt \
13+
&& mv /opt/java-${JAVA_VERSION} /opt/jdk \
1314
&& apt-get autoremove -y --purge unzip \
14-
&& rm -rf /var/lib/apt/lists/*
15+
&& rm -rf /var/lib/apt/lists/* /tmp/*

0 commit comments

Comments
 (0)