11-18 1 views
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
FROM local/c7-systemd RUN yum -y install zip unzip gzip tar ENV JAVA_HOME /usr/local/jdk1.8.0_281 ENV PATH $JAVA_HOME/bin:$PATH # Default to UTF-8 file.encoding ENV LANG C.UTF-8 ENV JAVA_VERSION 8u282 # Default time zone to Asia/Shanghai RUN ln -sfT /usr/share/zoneinfo/Asia/Shanghai /etc/localtime COPY ./jdk-8u281-linux-x64.tar.gz /tmp RUN set -eux; \ \ mkdir -p "$JAVA_HOME"; \ tar --extract \ --file /tmp/jdk-8u281-linux-x64.tar.gz \ --directory "$JAVA_HOME" \ --strip-components 1 \ --no-same-owner ; \ rm /tmp/jdk-8u281-linux-x64.tar.gz ; \ java -version CMD ["/usr/sbin/init"] |
1 2 |
docker build --rm -t local/c7-jdk8u281-base . docker run --privileged -ti --name c7-jdk8 local/c7-jdk8u281-base |
如果想赏钱,可以用微信扫描下面的二维码,一来能刺激我写博客的欲望,二来好维护云主机的费用; 另外再次标注博客原地址 itnotebooks.com 感谢!