我无法从 Docker 中提取 Java 8 图片,这个问题发生在昨天晚上可能 Oracle 已经改变了Java 8 I&#39的回购;我不确定。我收到以下错误:
Downloading Oracle Java 8...
--2017-11-02 09:48:41-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 93.186.137.138, 93.186.137.153
Connecting to download.oracle.com (download.oracle.com)|93.186.137.138|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz [following]
--2017-11-02 09:48:41-- https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.86.229.143, 2a02:26f0:c00:4bd::2d3e, 2a02:26f0:c00:48f::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.86.229.143|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1509616242_c2c10a584fa09bff72a90cbe16357500 [following]
--2017-11-02 09:48:42-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1509616242_c2c10a584fa09bff72a90cbe16357500
Reusing existing connection to download.oracle.com:80.
HTTP request sent, awaiting response... 404 Not Found
2017-11-02 09:48:45 ERROR 404: Not Found.
download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
这是我的 Dockerfile :
FROM ubuntu:15.04
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:webupd8team/java -y && \
apt-get update && \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get install -y oracle-java8-installer && \
apt-get clean
......
答案 0 :(得分:1)
Ubuntu版本是有问题的部分所以我改为 16.04 并且它有效。拥有最新的 Ubuntu版本会更好。