我想在Docker容器中的Ubuntu的基本映像上安装java 8。 我运行下面的命令,Docker:Ubuntu上的Java 8安装失败
RUN apt-get update && \
apt-get install -y software-properties-common python-software-properties && \
add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" && \
apt-get update && \
echo "$accept-license" | sudo debconf-set-selections && \
apt-get install --allow-unauthenticated -y oracle-java8-installer && \
rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/oracle-jdk8-installer
在运行上面的命令,我收到以下错误,
Connecting to download.oracle.com (download.oracle.com)|23.57.66.26|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-20 06:29:41 ERROR 404: Not Found.
下载失败
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)
谢谢 尔汉
你为什么不使用[官方Java图像(https://hub.docker.com/_/java/) –
或openjdk图像。 – zachdb86
@BukharovSergey我正在尝试做一个POC,我需要为java安装准备一个dockerfile – Farhan