我有非常简单的Dockerfile
FROM ubuntu:14.04
MAINTAINER XXX <[email protected]>
ARG DEBIAN_FRONTEND=noninteractive
RUN sudo apt-get -y update && sudo apt-get -y install apache2-utils
我在docker build期间看到以下消息
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
我从不同的来源阅读,
ARG DEBIAN_FRONTEND=noninteractive
应该有所帮助,但是没有帮助。带有和不带有Build输出看起来都一样。这正常吗?我的Docker版本是1.12。
更新
我也试过了
ENV DEBIAN_FRONTEND noninteractive
还有这个
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install apache2-utils
每次都会出现警告消息。
最佳答案
不建议持续设置DEBIAN_FRONTEND [1],[2]
使用此Dockerfile
摆脱警告:
FROM ubuntu:14.04
MAINTAINER XXX <[email protected]>
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install apache2-utils
关于ubuntu - 尽管在Docker镜像中有DEBIAN_FRONTEND,但仍存在debconf警告,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39242256/