Skip to content
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

podman build behaves differently from docker build #7398

Closed
c-goes opened this issue Aug 21, 2020 · 12 comments
Closed

podman build behaves differently from docker build #7398

c-goes opened this issue Aug 21, 2020 · 12 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@c-goes
Copy link

c-goes commented Aug 21, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

I tried building this image (https://github.com/geerlingguy/docker-ubuntu2004-ansible) with Podman and found out that Docker behaves differently from Podman. While Docker builds the image successfully, Podman stops and asks for geographic area (related issue: geerlingguy/docker-ubuntu2004-ansible#2 (comment)).

Steps to reproduce the issue:

  1. Clone https://github.com/geerlingguy/docker-ubuntu2004-ansible

  2. run podman build -t ubuntu2004-ansible .

Describe the results you received:

Setting up locales (2.31-0ubuntu9) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Generating locales (this might take a while)...
Generation complete.
Setting up libkrb5support0:amd64 (1.17-6ubuntu4) ...
Setting up tzdata (2020a-0ubuntu0.20.04) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
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 in which they are located.

  1. Africa   3. Antarctica  5. Arctic  7. Atlantic  9. Indian    11. SystemV  13. Etc
  2. America  4. Australia   6. Asia    8. Europe    10. Pacific  12. US
Geographic area: 

(at this point the build stops)

Describe the results you expected:

For best Docker compatibility the output should be similar to Docker:

Setting up locales (2.31-0ubuntu9) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Generating locales (this might take a while)...
Generation complete.
Setting up libkrb5support0:amd64 (1.17-6ubuntu4) ...
Setting up tzdata (2020a-0ubuntu0.20.04) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
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 in which they are located.

  1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
  2. America     5. Arctic     8. Europe    11. SystemV
  3. Antarctica  6. Asia       9. Indian    12. US
Geographic area: 
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 111.

Current default time zone: '/UTC'
Local time is now:      Fri Aug 14 18:06:39 UTC 2020.
Universal Time is now:  Fri Aug 14 18:06:39 UTC 2020.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 83, <GEN6> line 4.
Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 84, <GEN6> line 4.
Setting up libcap2-bin (1:2.32-1) ...
Setting up libdconf1:amd64 (0.36.0-1) ...
Setting up libglib2.0-data (2.64.3-1~ubuntu20.04.1) ...
Setting up libdbus-1-3:amd64 (1.12.16-2ubuntu2.1) ...
Setting up dbus (1.12.16-2ubuntu2.1) ...
Setting up libmnl0:amd64 (1.0.4-2) ...
Setting up sudo (1.8.31-1ubuntu1.1) ...
Setting up ucf (3.0038+nmu1) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libk5crypto3:amd64 (1.17-6ubuntu4) ...
Setting up libxtables12:amd64 (1.8.4-3ubuntu2) ...
Setting up python-apt-common (2.0.0ubuntu0.20.04.1) ...
Setting up libpam-systemd:amd64 (245.4-4ubuntu3.2) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libgirepository-1.0-1:amd64 (1.64.1-1~ubuntu20.04.1) ...
Setting up libkrb5-3:amd64 (1.17-6ubuntu4) ...
Setting up libstemmer0d:amd64 (0+svn585-2) ...
Setting up libmpdec2:amd64 (2.4.2-3) ...
Setting up glib-networking-common (2.64.2-1ubuntu0.1) ...
Setting up openssl (1.1.1f-1ubuntu2) ...
Setting up libbsd0:amd64 (0.10.0-1) ...
Setting up libelf1:amd64 (0.176-1.1build1) ...
Setting up readline-common (8.0-4) ...
Setting up iso-codes (4.4-1) ...
Setting up libpolkit-gobject-1-0:amd64 (0.105-26ubuntu1) ...
Setting up libgstreamer1.0-0:amd64 (1.16.2-2) ...
Setcap worked! gst-ptp-helper is not suid!
Setting up glib-networking-services (2.64.2-1ubuntu0.1) ...
Setting up iproute2 (5.5.0-1ubuntu1) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libicu66:amd64 (66.1-2ubuntu2) ...
Setting up libreadline8:amd64 (8.0-4) ...
Setting up rsyslog (8.2001.0-1ubuntu1) ...
Adding user `syslog' to group `adm' ...
Adding user syslog to group adm
Done.
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype

Creating config file /etc/rsyslog.d/50-default.conf with new version
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Created symlink /etc/systemd/system/multi-user.target.wants/dmesg.service → /lib/systemd/system/dmesg.service.
Created symlink /etc/systemd/system/syslog.service → /lib/systemd/system/rsyslog.service.
Created symlink /etc/systemd/system/multi-user.target.wants/rsyslog.service → /lib/systemd/system/rsyslog.service.
Setting up libglib2.0-bin (2.64.3-1~ubuntu20.04.1) ...
Setting up ca-certificates (20190110ubuntu1.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
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
127 added, 0 removed; done.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:      2.0.4
API Version:  1
Go Version:   go1.14.2
Built:        Thu Jan  1 01:00:00 1970
OS/Arch:      linux/amd64

Package info (e.g. output of rpm -q podman or apt list podman):

podman/unknown,now 2.0.4~1 amd64 [installed]
podman/unknown 2.0.4~1 arm64
podman/unknown 2.0.4~1 armhf
podman/unknown 2.0.4~1 s390x

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

physical

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 21, 2020
@mheon
Copy link
Member

mheon commented Aug 21, 2020

@TomSweeneyRedHat PTAL

@TomSweeneyRedHat
Copy link
Member

@c-goes on a quick look, I'm not sure why Podman isn't acting like Docker in this instance. FWIW, after Docker completes, it sets the time zone to UTC +0000 (blank), which you probably don't want:

# docker run tom date +"%Z %z"
UTC +0000

In the short term, if you want to emulate that, you can add this ARG line to your Dockerfile after your ENV statement:

ENV pip_packages "ansible"

ARG DEBIAN_FRONTEND=nointeractive

or better yet, also add a ENV for the TZ variable to your Dockerfile too:

ENV pip_packages "ansible"
ENV TZ 'America/New_York'

ARG DEBIAN_FRONTEND=nointeractive

Which will give you:

# podman run tom date +"%Z %z"
EDT -0400

I'll try to figure out what's going on in the mean time, but this will be at a lower priority as there's the above workaround. Hope that helps.

@vrothberg
Copy link
Member

@TomSweeneyRedHat, can we move it over to buildah?

@TomSweeneyRedHat
Copy link
Member

I think this one lives in both Buildah and Podman, but if you want to move it, feel free. Personally I'm wondering if it's something we should fix or not. I'm not convinced that what Docker is doing is correct in this instance, but just setting the UTC to zero if unset might be the way to go to avoid the TZ ask for a script.

@rhatdan
Copy link
Member

rhatdan commented Sep 8, 2020

Is the difference that Docker does not provide a tty to ask the question at, and podman/Buildah does? Apt figures there is no tty so it just continues the install?

@TomSweeneyRedHat
Copy link
Member

@rhatdan, the tty/notty angle sounds like a very good theory.

@rhatdan
Copy link
Member

rhatdan commented Sep 9, 2020

If you run the podman build command with < /dev/null, does this fix the situation?

@rhatdan
Copy link
Member

rhatdan commented Oct 5, 2020

@c-goes Are you still having this issue?

@c-goes
Copy link
Author

c-goes commented Oct 5, 2020

Works for me now. Thank you.

@c-goes c-goes closed this as completed Oct 5, 2020
@c-goes
Copy link
Author

c-goes commented Oct 6, 2020

I'm sorry, I was wrong. It doesn't work, tested with master branch.

@github-actions
Copy link

github-actions bot commented Nov 6, 2020

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Dec 23, 2020

This should be fixed in main branch, since I know the stdin is disabled, I am working on a mechanism to add a flag for people who want this ability back under certain circumstances.

@rhatdan rhatdan closed this as completed Dec 23, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
Development

No branches or pull requests

6 participants