Hi all. I want to automate the building of docker images by running it in Jenkins overnight, but Jenkins itself and all the nodes are docker containers. Therefore I am using buildah to build the image. The problem I am running into is whenever it gets to any APT steps, APT fails to resolve.
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease
System error resolving 'archive.ubuntu.com:80' - getaddrinfo (22: Invalid argument)
Err:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
System error resolving 'security.ubuntu.com:80' - getaddrinfo (22: Invalid argument)
Err:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
System error resolving 'archive.ubuntu.com:80' - getaddrinfo (22: Invalid argument)
Err:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
System error resolving 'archive.ubuntu.com:80' - getaddrinfo (22: Invalid argument)
Reading package lists...
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.odY0hI - IsAccessibleBySandboxUser (22: Invalid argument)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.VGaW1Y - IsAccessibleBySandboxUser (22: Invalid argument)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.7s2FkD - IsAccessibleBySandboxUser (22: Invalid argument)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.1LwGmA - IsAccessibleBySandboxUser (22: Invalid argument)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease System error resolving 'archive.ubuntu.com:80' - getaddrinfo (22: Invalid argument)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease System error resolving 'archive.ubuntu.com:80' - getaddrinfo (22: Invalid argument)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease System error resolving 'archive.ubuntu.com:80' - getaddrinfo (22: Invalid argument)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease System error resolving 'security.ubuntu.com:80' - getaddrinfo (22: Invalid argument)
W: Some index files failed to download. They have been ignored, or old ones used instead.
I’ve tried running a generic Ubuntu container with some network utilities installed just for testing (using both buildah run and podman run, DNS works fine, can connect to anything else, but same issue when trying to run any APT commands.