[Bug 1875882] Re: debconf attempts interactive configuration; breaks Docker image builds

Tianon Gravi admwiggin at gmail.com
Wed Apr 29 14:54:03 UTC 2020


** Also affects: debconf (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debconf in Ubuntu.
https://bugs.launchpad.net/bugs/1875882

Title:
  debconf attempts interactive configuration; breaks Docker image builds

Status in cloud-images:
  New
Status in debconf package in Ubuntu:
  New

Bug description:
  When I build a container image using a Dockerfile based on the
  official "ubuntu" image, if I try to install packages that use debconf
  to obtain configuration information, the build fails because debconf
  tries to interact with the user (which is not possible when building a
  container, since the build process must be non-interactive).

  How to reproduce:

  1) install Docker (the version doesn't seem to matter; tried with
  various 19.03 variants)

  2) run the following command to try and build an image:

  ```
  docker build - <<EOF
  FROM ubuntu
  RUN apt-get update
  RUN apt-get install -y perl-modules tzdata
  EOF
  ```

  The build remains stuck when debconf ask the "Geographic area:".

  Notes:

  A) The problem doesn't appear when trying to install tzdata by itself
  (without perl-modules), because then debconf hits a bug and bails out
  with a zero status code, allowing the package install to succeed:

  ```
  Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 111.
  ```

  B) If you wonder "why is this person trying to install tzdata in a
  container?!?" - I'm not! But tzdata is a dependency of many other
  packages. When trying to reproduce the bug, I reduced it to the
  simplest case I could find (which was tzdata + perl-modules).

  C) That problem did not happen in 16.04 (you can check by replacing
  "FROM ubuntu" with "FROM ubuntu:16:04" in the repro above). It did
  happen in 18.04, but it was less likely to show up, because tzdata was
  less depended upon. I have Dockerfiles that worked with 18.04, and
  break with 20.04, because they install packages that didn't depend on
  tzdata in 18.04, but do depend on tzdata in 20.04.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1875882/+subscriptions



More information about the foundations-bugs mailing list