New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.04] debconf: delaying package configuration, since apt-utils is not installed #319

Closed
hyperknot opened this Issue Jul 14, 2016 · 31 comments

Comments

Projects
None yet
@hyperknot
Collaborator

hyperknot commented Jul 14, 2016

On newest image 0.9.19, if I run any apt-get command, I received the following red warning line:
debconf: delaying package configuration, since apt-utils is not installed

Minimal example:

FROM phusion/baseimage:0.9.19

# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]

# ...put your own build instructions here...
RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold"

# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

This is only happening in 0.9.19 / Ubuntu 16.04.

@hyperknot hyperknot changed the title from debconf: delaying package configuration, since apt-utils is not installed to 16.04: debconf: delaying package configuration, since apt-utils is not installed Jul 14, 2016

@hyperknot hyperknot changed the title from 16.04: debconf: delaying package configuration, since apt-utils is not installed to [16.04] debconf: delaying package configuration, since apt-utils is not installed Jul 14, 2016

@FranklinYu

This comment has been minimized.

FranklinYu commented Aug 2, 2016

Upstream problem; I can confirm this with clean image ubuntu:16.04. Reporting to them at tianon/docker-brew-ubuntu-core#59.

@aa21

This comment has been minimized.

aa21 commented Sep 8, 2016

Did you find any solutions for this? @hyperknot @FranklinYu

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Sep 8, 2016

yes, I'm installing it myself

On Thursday, 8 September 2016, aa notifications@github.com wrote:

Did you find any solutions for this? @hyperknot
https://github.com/hyperknot @FranklinYu https://github.com/franklinyu


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#319 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAeKj3pTbewfwizfVv8RAwaA58N22DN7ks5qn5TUgaJpZM4JMfSU
.

@FranklinYu

This comment has been minimized.

FranklinYu commented Sep 8, 2016

@aa21 I did not. The Debian-Docker guys thought this is an issue of APT incorrectly requiring the (unnecessary) package, and refused to fix it, since this is just a warning not able to stop you from anything. I guess they are too busy for it.

Good to hear that @hyperknot is trying to fix it. I am looking forward to his solution/workaround.

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Sep 9, 2016

My solution is just to put a

RUN apt-get update && apt-get install -y --no-install-recommends apt-utils

line in the docker file and it fixes the problem.

@aa21

This comment has been minimized.

aa21 commented Sep 13, 2016

Thanks @hyperknot and @FranklinYu.

@WesleyBatista

This comment has been minimized.

WesleyBatista commented Oct 21, 2016

It did not worked for me =/

Step 2 : ENV DEBIAN_FRONTEND noninteractive
 ---> Running in 1b35b989ce4d
 ---> 78f654f9ea69
Removing intermediate container 1b35b989ce4d
Step 3 : RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
 ---> Running in 29d7eb2e1bb5
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/main Sources [1103 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/restricted Sources [5179 B]
Get:6 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [250 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [129 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [522 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [432 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-security/main Sources [52.7 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources [13.4 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages [196 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [62.2 kB]
Fetched 18.4 MB in 4min 14s (72.2 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libapt-inst2.0
The following NEW packages will be installed:
  apt-utils libapt-inst2.0
0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
Need to get 251 kB of archives.
After this operation, 1203 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-inst2.0 amd64 1.2.12~ubuntu16.04.1 [55.4 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt-utils amd64 1.2.12~ubuntu16.04.1 [196 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 251 kB in 1s (176 kB/s)
Selecting previously unselected package libapt-inst2.0:amd64.
(Reading database ... 7256 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.2.12~ubuntu16.04.1_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.2.12~ubuntu16.04.1) ...
Selecting previously unselected package apt-utils.
Preparing to unpack .../apt-utils_1.2.12~ubuntu16.04.1_amd64.deb ...
Unpacking apt-utils (1.2.12~ubuntu16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Setting up libapt-inst2.0:amd64 (1.2.12~ubuntu16.04.1) ...
Setting up apt-utils (1.2.12~ubuntu16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
@Lewiscowles1986

This comment has been minimized.

Lewiscowles1986 commented Oct 31, 2016

it's the only red command I now get when setting up my jekyll x86 base image...

@yosualb

This comment has been minimized.

yosualb commented Nov 23, 2016

RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-utils

didn't work for me too.

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Nov 24, 2016

It is a harmless 1 line warning message.

The command does get installed, and following apt-get commands do not show any error / warning messages.

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Nov 24, 2016

I started making an updated fork of this project, containing Ubuntu 16.04 fixes, including this one. Have a look here:
https://github.com/hyperknot/baseimage16

@vlymar

This comment has been minimized.

vlymar commented Jan 13, 2017

The command does get installed, and following apt-get commands do not show any error / warning messages.

When I install apt-utils before the rest of apt packages, I only get delaying package configuration for the installation of the apt-utils package, which makes sense. However, I get the following warnings for the other packages:

debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
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: 

Apparently this is also a harmless warning that can be avoided by setting DEBIAN_FRONTEND=noninteractive as some others have in this thread.

If anyone is wondering what the best-practice way to set this variable is, this is the best info I could find moby/moby#4032 (comment) .

The key takeaway there is make sure you don't use ENV to set this because it will persist in the image, but you only want that value set during the docker build stage.

I wonder though, what if you're installing a package that does depend on interactive configuration? Does apt-get just fail, or will it just silently leave the package unconfigured?

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Jan 13, 2017

I don't think apt-get allows packages which only work in interactive mode. So all packages must work in noninteractive mode.

What I do is I set

ENV DEBIAN_FRONTEND noninteractive

in the beginning of the Docker file
and I set

ENV DEBIAN_FRONTEND teletype

At the very end. This way both interactive and non-interactive modes get set.

@FranklinYu

This comment has been minimized.

FranklinYu commented Jan 16, 2017

@hyperknot Why two ENV instead of a single (and more future-proof) ARG?

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Jan 16, 2017

They are totally different. ENV is persistent in the image. It'd still need two cases here.

@FranklinYu

This comment has been minimized.

FranklinYu commented Jan 16, 2017

But why do you need to persist it (which overrides the default)? The default frontend works for me. In addition, --no-install-recommends can be omitted since apt-utils doesn't have any recommended package.

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Jan 16, 2017

@FranklinYu

This comment has been minimized.

FranklinYu commented Jan 16, 2017

Yes, I just confirmed that. I thought the default only gives warning when installing packages in Dockerfile. I missed that because the warning was not highlighted as red (of course), and that doesn't happen on normal Ubuntu. However, teletype is not a known value for DEBIAN_FRONTEND according to documentation online (??); the newt, mentioned as default in documentation, still produces the warning for me (???).

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Jan 16, 2017

@Theaxiom

This comment has been minimized.

Collaborator

Theaxiom commented Mar 19, 2017

Being that this is an upstream issue, I am closing this issue. It looks like there is a viable workaround and this issue will remain for posterity.

@Theaxiom Theaxiom closed this Mar 19, 2017

@aairey

This comment has been minimized.

aairey commented Apr 23, 2017

FWIW
It is better to use ARG on newer docker installations, as this only sets the ENV during build time (See moby/moby#4032).

ARG DEBIAN_FRONTEND=noninteractive

But I am still getting the warnings about apt-utils.

@Theaxiom

This comment has been minimized.

Collaborator

Theaxiom commented Apr 23, 2017

@aairey Did you try adding this to your Dockerfile?

RUN apt-get update && apt-get install -y --no-install-recommends apt-utils

@FranklinYu

This comment has been minimized.

FranklinYu commented Apr 24, 2017

@aairey We discussed about why we need ENV instead of ARG above.

@aairey

This comment has been minimized.

aairey commented Apr 24, 2017

@Theaxiom this just installs apt-utils?
I thought there was a way to just make the warning go away without installing apt-utils.
When apt-utils is installed, the build is way slower, and since it is not the default I prefer not to install it.
But seems there is no way to get rid of the warning without installing apt-utils?

@FranklinYu it works for me just using ARG.
The apt-utils warning and reason for using noninteractive is unrelated. (unless I am missing something?).
The noninteractive setting just makes sure no dialogs are opened and that dpkg-reconfigure dus not prompt you for input.
At least that is my understanding after fiddling around with it yesterday.
And thus you should always use noninteractive when using apt-get during build.

@Theaxiom

This comment has been minimized.

Collaborator

Theaxiom commented Apr 24, 2017

@aairey Unfortunately, I think that is indeed the only way to make the error message go away. From what I understand it is a no-op.

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Apr 25, 2017

You need both apt-utils and noninteractive. Installing apt-utils is really not making any difference in build speed, it's a tiny util which should actually be part of official image.

@Theaxiom

This comment has been minimized.

Collaborator

Theaxiom commented Apr 25, 2017

@hyperknot Are you proposing this be added to baseimage-docker?

@Theaxiom Theaxiom reopened this Apr 25, 2017

@Theaxiom Theaxiom self-assigned this Apr 25, 2017

@Theaxiom Theaxiom added the bug label Apr 25, 2017

@hyperknot

This comment has been minimized.

Collaborator

hyperknot commented Apr 26, 2017

@Theaxiom I'd definitely add apt-utils here:
https://github.com/hyperknot/baseimage16/blob/master/image/prepare.sh#L34
and teletype at the end:
https://github.com/hyperknot/baseimage16/blob/master/image/Dockerfile#L19

noninteractive is already part of buildconfig

@Theaxiom

This comment has been minimized.

Collaborator

Theaxiom commented Apr 26, 2017

Sounds like a plan, thanks @hyperknot 👍

@Theaxiom Theaxiom added this to the 0.9.22 milestone Apr 26, 2017

@hyperknot hyperknot referenced this issue May 9, 2017

Merged

apt-get fixes #406

krmcbride added a commit to krmcbride/dockerfiles that referenced this issue Jul 12, 2017

axl89 added a commit to axl89/rpi-owncloud that referenced this issue Jul 29, 2017

Spellchaser added a commit to Spellchaser/kube-monkey that referenced this issue Oct 9, 2017

Enhancing Dockerfile
Locally, I pull first from artifactory which might have a custom version of ubuntu that has tzdata already. The conditional makes extending the use in other environments a lot easier.

Also takes care of warning `debconf: delaying package configuration, since apt-utils is not installed` using flag `--no-install-recommends apt-utils` 
phusion/baseimage-docker#319

asobti pushed a commit to asobti/kube-monkey that referenced this issue Nov 9, 2017

Enhancing Dockerfile
Locally, I pull first from artifactory which might have a custom version of ubuntu that has tzdata already. The conditional makes extending the use in other environments a lot easier.

Also takes care of warning `debconf: delaying package configuration, since apt-utils is not installed` using flag `--no-install-recommends apt-utils` 
phusion/baseimage-docker#319

hazybluedot added a commit to hazybluedot/rmarkdown-gitlab-runner that referenced this issue Jul 21, 2018

@EduardoBorsa

This comment has been minimized.

EduardoBorsa commented Dec 13, 2018

Anyone was able to solve this?
None of the previous solutions solved for me.
Still receiving the "returned a non-zero code: 100"

@viniarck

This comment has been minimized.

viniarck commented Dec 15, 2018

ruslanguns added a commit to ruslanguns/vtiger_docker that referenced this issue Dec 16, 2018

Fix to debconf: delaying package configuration
ERROR: debconf: delaying package configuration, since apt-utils is not installed

Fix source: 
phusion/baseimage-docker#319 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment