Moby: Error debconf: unable to initialize frontend: Dialog

Created on 2 Nov 2016  路  6Comments  路  Source: moby/moby

Error message

When I'm building new image with docker, I get an error message:

Get:1 http://deb.debian.org/debian/ jessie/main ruby all 1:2.1.5+deb8u2 [9688 B]
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:

Issue

This error message does not stop the build, but is there a way to remove this?
I used ARG to set DEBIAN_FRONTEND to noninteractive, but it looks like it didn't work.

Here is my Docker file:

FROM debian:jessie

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get -y install sudo \
&& apt-get -y install apt-utils  \
&& apt-get -y install curl \
&& curl -sL https://deb.nodesource.com/setup_5.x | bash -

RUN apt-get -y install nodejs \
&& apt-get -y install wget \
&& sudo wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh \
&& apt-get -y install git \
&& mkdir -p /usr/src/app \
&& git config --global user.email "[email protected]" \
&& git config --global user.name "The Yotako team"

WORKDIR /usr/src/app

COPY . /usr/src/app

RUN cat /usr/src/app/.heroku_cred_dev | heroku login

RUN npm install --production

ENV NODE_ENV=development

CMD [ "nodejs", "/usr/src/app/bin/www" ]
arebuilder

Most helpful comment

apt-get install dialog apt-utils

All 6 comments

Not sure if there is a way to suppress these.
Closing since this is not a Docker issue but rather apt/readline and may be more suitable for something like StackOverflow.

Thanks!

apt-get install dialog apt-utils

run headless with -y:

RUN apt-get install dialog apt-utils -y

EXAMPLE With Success:

echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
sudo apt-get install -y -q

It works fine for me.

EXAMPLE With Success:

echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
sudo apt-get install -y -q

It works fine for me.

if error continue don麓t forget
sudo chmod 777 /var/cache/debconf/
sudo chmod 777/var/cache/debconf/passwords.dat`

EXAMPLE With Success:

echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
sudo apt-get install -y -q

It works fine for me.

A simple update. I've got an error running this.
Just added a sudo after |

echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
sudo apt-get install -y -q
Was this page helpful?
0 / 5 - 0 ratings