Closed adelton closed 12 months ago
I would provide a patch but the repository documentation is not very clear how the images found on Docker Hub are built.
When I do
$ podman build -t localhost/almalinux-8 -f dockerfiles/al8/Dockerfile.base .
[...]
[3/3] STEP 4/4: CMD ["/bin/bash"]
--> Using cache 39f91e97c12188f45f38c9de440e356a7a3852faf8bdd39bb2e39e01ea527689
[3/3] COMMIT localhost/almalinux-8
--> 39f91e97c121
Successfully tagged localhost/almalinux-8:latest
Successfully tagged localhost/almalinux/8-base:latest
39f91e97c12188f45f38c9de440e356a7a3852faf8bdd39bb2e39e01ea527689
$ podman run --dns=none --rm localhost/almalinux-8:latest ls -la /etc/resolv.conf
-rwx------. 1 root root 0 Sep 30 11:40 /etc/resolv.conf
the /etc/resolv.conf
is clearly in the image.
The /etc/hostname
also needs to get added.
See /etc/resolv.conf
in the diff:
https://github.com/docker-library/official-images/pull/15760#issuecomment-1823180278
Due to bug https://bugzilla.redhat.com/show_bug.cgi?id=1941142 which is present in all recent podman version as well, running
podman diff
on an AlmaLinux-based container reportsC /etc
even if nothing in the container changed. It's due to the fact that the container images do not contain/etc/resolv.conf
.Steps to reproduce:
$ podman run --name test-diff docker.io/almalinux/8-base date
$ podman diff test-diff
$ podman rm -f test-diff
Actual results:
Expected results:
Nothing output by that
podman diff
command.Additional information:
I believe that this is caused by
Even if this is a podman problem and not AlmaLinux problem, please consider adding a workaround by having a placeholder file in the container because it makes it hard to debug software based on AlmaLinux and hides runtime changes that it might be doing in
/etc
.For example, Fedora has