构建 h2o docker 图像时如何处理 java8 安装问题 [在存储库中使用 Dockerfile]
How to handle java8 installation issue when building h2o docker image [using Dockerfile in the repository]
我正在尝试构建 H2o docker 图像,使用 https://github.com/h2oai/h2o-3/blob/master/Dockerfile。
出现以下错误:
E: 软件包 'oracle-java8-installer' 没有安装候选项
命令'/bin/sh -c echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/.deb || true";};' | tee /etc/apt/apt.conf.d/no-cache && echo "deb http://mirror.math.princeton.edu/pub/ubuntu xenial main universe" >> /etc/apt/sources.list && apt-get update -q -y && apt-get dist-upgrade -y && apt-get clean && rm -rf /var/cache/apt/ && DEBIAN_FRONTEND=noninteractive apt-get install -y wget unzip python-pip python-sklearn python-pandas python-numpy python-matplotlib software-properties-common python-software-properties && add-apt-repository -y ppa:webupd8team/java && apt-get update -q && echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java8-installer && apt-get clean && wget http://h2o-release.s3.amazonaws.com/h2o/latest_stable -O latest && wget --no-check-certificate -i latest -O /opt/h2o.zip && unzip -d /opt /opt/h2o.zip && rm /opt/h2o.zip && cd /opt && cd find . -name 'h2o.jar' | sed 's/.\///;s/\/h2o.jar//g'
&& cp h2o.jar /opt && /usr/bin/pip install find . -name "*.whl"
&& cd / && wget https://raw.githubusercontent.com/h2oai/h2o-3/master/docker/start-h2o-docker.sh && chmod +x start-h2o-docker.sh && wget http://s3.amazonaws.com/h2o-training/mnist/train.csv.gz && gunzip train.csv.gz && wget https://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Extraction_Script.py && wget https://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Transformation_Script.py && wget https://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Modeling_Script.py' 返回了一个非零代码:100
我假设它可能与最近的 Oracle JDK 许可证更新有关。
有没有办法解决构建 docker 图像时出现的这个错误?
是的,pkg 似乎已从存储库中删除。我在 3 月 26 日创建了以下内容,并在当天成功构建...
From ubuntu:16.04
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:webupd8team/java -y
RUN apt-get update
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN apt-get install -y oracle-java8-installer
今天就是这个结果
Step 8/8 : RUN apt-get install -y oracle-java8-installer
---> Running in 1bba5bac63e9
Reading package lists...
Building dependency tree...
Reading state information...
Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'oracle-java8-installer' has no installation candidate
The command '/bin/sh -c apt-get install -y oracle-java8-installer' returned a non-zero code: 100
我已经转移到 OpenJDK 并正在试用 Corretto
更新:
PPA 已停产...请在此处查看他们的通知:
https://launchpad.net/~webupd8team/+archive/ubuntu/java
您可以改用 openjdk-8。
我遇到了类似的问题,我发现以下图像是 运行 h2o flow UI 的预构建图像。
我正在尝试构建 H2o docker 图像,使用 https://github.com/h2oai/h2o-3/blob/master/Dockerfile。
出现以下错误:
E: 软件包 'oracle-java8-installer' 没有安装候选项
命令'/bin/sh -c echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/.deb || true";};' | tee /etc/apt/apt.conf.d/no-cache && echo "deb http://mirror.math.princeton.edu/pub/ubuntu xenial main universe" >> /etc/apt/sources.list && apt-get update -q -y && apt-get dist-upgrade -y && apt-get clean && rm -rf /var/cache/apt/ && DEBIAN_FRONTEND=noninteractive apt-get install -y wget unzip python-pip python-sklearn python-pandas python-numpy python-matplotlib software-properties-common python-software-properties && add-apt-repository -y ppa:webupd8team/java && apt-get update -q && echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java8-installer && apt-get clean && wget http://h2o-release.s3.amazonaws.com/h2o/latest_stable -O latest && wget --no-check-certificate -i latest -O /opt/h2o.zip && unzip -d /opt /opt/h2o.zip && rm /opt/h2o.zip && cd /opt && cd find . -name 'h2o.jar' | sed 's/.\///;s/\/h2o.jar//g'
&& cp h2o.jar /opt && /usr/bin/pip install find . -name "*.whl"
&& cd / && wget https://raw.githubusercontent.com/h2oai/h2o-3/master/docker/start-h2o-docker.sh && chmod +x start-h2o-docker.sh && wget http://s3.amazonaws.com/h2o-training/mnist/train.csv.gz && gunzip train.csv.gz && wget https://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Extraction_Script.py && wget https://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Transformation_Script.py && wget https://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Modeling_Script.py' 返回了一个非零代码:100
我假设它可能与最近的 Oracle JDK 许可证更新有关。
有没有办法解决构建 docker 图像时出现的这个错误?
是的,pkg 似乎已从存储库中删除。我在 3 月 26 日创建了以下内容,并在当天成功构建...
From ubuntu:16.04
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:webupd8team/java -y
RUN apt-get update
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN apt-get install -y oracle-java8-installer
今天就是这个结果
Step 8/8 : RUN apt-get install -y oracle-java8-installer
---> Running in 1bba5bac63e9
Reading package lists...
Building dependency tree...
Reading state information...
Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'oracle-java8-installer' has no installation candidate
The command '/bin/sh -c apt-get install -y oracle-java8-installer' returned a non-zero code: 100
我已经转移到 OpenJDK 并正在试用 Corretto
更新:
PPA 已停产...请在此处查看他们的通知: https://launchpad.net/~webupd8team/+archive/ubuntu/java
您可以改用 openjdk-8。
我遇到了类似的问题,我发现以下图像是 运行 h2o flow UI 的预构建图像。