相关疑难解决方法(0)

docker java7安装失败

我正在尝试通过ppa(RUN add-apt-repository ppa:webupd8team/java -y)在我的docker镜像中安装java7,但它失败并出现此错误:

returned a non-zero code: 127
Run Code Online (Sandbox Code Playgroud)

以下是建议正确安装的方法,但它不起作用.我也试过了两个ppas.

RUN  apt-get install python-software-properties -y
RUN  add-apt-repository ppa:webupd8team/java -y
#RUN add-apt-repository ppa:eugenesan/java -y
RUN apt-get update
RUN  apt-get install oracle-java7-installer -y
Run Code Online (Sandbox Code Playgroud)

这是日志输出:

Step 28 : RUN  add-apt-repository ppa:webupd8team/java -y
 ---> Running in b278761a4209
 [91m/bin/sh: 1: add-apt-repository: not found
 [0m 
Run Code Online (Sandbox Code Playgroud)

所以...我需要找出辅助库中存在此命令的位置或内容:

add-apt-repository
Run Code Online (Sandbox Code Playgroud)

add-apt-repository似乎是python-software-properties安装的一部分.除了在构建的其他区域弹出的这些消息之外,我在该步骤中没有看到任何真正的错误.所以我假设如果我能解决这个问题,前面提到的python步骤将根据需要安装:

    [91mdebconf: unable to initialize frontend: Dialog
     debconf: (TERM is not set, so the dialog frontend is not usable.)
     debconf: falling back to frontend: Readline
     [0m[91mdebconf: unable …
Run Code Online (Sandbox Code Playgroud)

java docker

22
推荐指数
2
解决办法
2万
查看次数

如何自动回答安装提示(“是”除外)?

概要

我正在尝试构建一个 Docker 映像,但它失败了,因为我试图获取的包之一apt install在安装过程中提示用户。我想回复此提示,但我不知道如何以非交互方式进行回复。

描述

我正在构建一个 Docker 映像,我的 Dockerfile 具有以下行:

RUN apt install -y texlive-latex-extra
Run Code Online (Sandbox Code Playgroud)

(这个包有一些我需要的 LaTeX 库。)

在安装过程中,这会停止:

Setting up tzdata (2018d-1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Configuring tzdata
------------------

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones …
Run Code Online (Sandbox Code Playgroud)

apt tex-live dockerfile

5
推荐指数
1
解决办法
3461
查看次数

标签 统计

apt ×1

docker ×1

dockerfile ×1

java ×1

tex-live ×1