I am scratching my head trying to figure this one out.
Under a freshly installed Fedora 32, the following minimal container does not execute properly:
FROM centos:7
RUN yum install -y sudo && yum clean all -y
RUN useradd -m test
RUN sudo -u test true
To test this, execute:
podman build .
The result is:
STEP 4: RUN sudo -u test true
sudo: PAM account management error: Authentication service cannot retrieve authentication info
Error: error building at STEP "RUN sudo -u test true": error while running runtime: exit status 1
Now I am wondering, what makes fedora 32 special? I am pretty sure this used to work under 31. Since the version of sudo
being involved and its environment is unchanged, the only difference could be podman. But what does podman have to do with the invocation of sudo
inside the container (or PAM in general)?
(this question was tagged with "docker" because I cannot create the tag "podman")