diff --git a/go.mod b/go.mod index fe31e76f06..da7613d582 100644 --- a/go.mod +++ b/go.mod @@ -12,10 +12,10 @@ require ( github.com/checkpoint-restore/go-criu/v7 v7.2.0 github.com/containernetworking/plugins v1.7.1 github.com/containers/buildah v1.40.1-0.20250604193037-b8d8cc375f30 - github.com/containers/common v0.63.2-0.20250701090630-c156ac84320e + github.com/containers/common v0.63.2-0.20250707185859-2b4e95a951de github.com/containers/conmon v2.0.20+incompatible github.com/containers/gvisor-tap-vsock v0.8.6 - github.com/containers/image/v5 v5.35.1-0.20250703163716-35325479c8f4 + github.com/containers/image/v5 v5.35.1-0.20250707180819-778317a88563 github.com/containers/libhvee v0.10.0 github.com/containers/ocicrypt v1.2.1 github.com/containers/psgo v1.9.0 diff --git a/go.sum b/go.sum index 295d27f948..137640e86c 100644 --- a/go.sum +++ b/go.sum @@ -64,14 +64,14 @@ github.com/containernetworking/plugins v1.7.1 h1:CNAR0jviDj6FS5Vg85NTgKWLDzZPfi/ github.com/containernetworking/plugins v1.7.1/go.mod h1:xuMdjuio+a1oVQsHKjr/mgzuZ24leAsqUYRnzGoXHy0= github.com/containers/buildah v1.40.1-0.20250604193037-b8d8cc375f30 h1:kCt0fnVBvXY9J98pUDeUc0gHKrhRwaBTWWD3otLutCE= github.com/containers/buildah v1.40.1-0.20250604193037-b8d8cc375f30/go.mod h1:QDecwvjrr+e0VD5GYv2dw7tsiqrz673r8B4rIYFP11Y= -github.com/containers/common v0.63.2-0.20250701090630-c156ac84320e h1:cCuLHWkEIdsMdvD8sqpXmTeujPdBqKQkk64bwp4toBM= -github.com/containers/common v0.63.2-0.20250701090630-c156ac84320e/go.mod h1:WyydvanMw4iZI2pnup5MbK7zyDvLUBTaTyva3fYwBwc= +github.com/containers/common v0.63.2-0.20250707185859-2b4e95a951de h1:52Qyd3ijcmsRNiv2Dl8JVdvewO4YRM0a8+FwLHq3ylk= +github.com/containers/common v0.63.2-0.20250707185859-2b4e95a951de/go.mod h1:WyydvanMw4iZI2pnup5MbK7zyDvLUBTaTyva3fYwBwc= github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg= github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I= github.com/containers/gvisor-tap-vsock v0.8.6 h1:9SeAXK+K2o36CtrgYk6zRXbU3zrayjvkrI8b7/O6u5A= github.com/containers/gvisor-tap-vsock v0.8.6/go.mod h1:+0mtKmm4STeSDnZe+DGnIwN4EH2f7AcWir7PwT28Ti0= -github.com/containers/image/v5 v5.35.1-0.20250703163716-35325479c8f4 h1:Wb8HsIAnJl7vyqjghMsnftRobECBBR+2p6r3hBfBhHs= -github.com/containers/image/v5 v5.35.1-0.20250703163716-35325479c8f4/go.mod h1:djHq2If38NWdEC9aZxGoZj4HxKOrkDo6QOOKz5wdJTs= +github.com/containers/image/v5 v5.35.1-0.20250707180819-778317a88563 h1:LDvwngzUOv0V0UUuGQXXaxUeH7HNRDe+gl+3Plv8A5s= +github.com/containers/image/v5 v5.35.1-0.20250707180819-778317a88563/go.mod h1:djHq2If38NWdEC9aZxGoZj4HxKOrkDo6QOOKz5wdJTs= github.com/containers/libhvee v0.10.0 h1:7VLv8keWZpHuGmWvyY4c1mVH5V1JYb1G78VC+8AlrM0= github.com/containers/libhvee v0.10.0/go.mod h1:at0h8lRcK5jCKfQgU/e6Io0Mw12F36zRLjXVOXRoDTM= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA= diff --git a/vendor/github.com/containers/common/libnetwork/etchosts/ip.go b/vendor/github.com/containers/common/libnetwork/etchosts/ip.go index 588fbff352..f11147f2de 100644 --- a/vendor/github.com/containers/common/libnetwork/etchosts/ip.go +++ b/vendor/github.com/containers/common/libnetwork/etchosts/ip.go @@ -2,12 +2,14 @@ package etchosts import ( "net" + "sync" "github.com/containers/common/libnetwork/types" "github.com/containers/common/libnetwork/util" "github.com/containers/common/pkg/config" "github.com/containers/common/pkg/machine" "github.com/containers/storage/pkg/unshare" + "github.com/sirupsen/logrus" ) // HostContainersInternalOptions contains the options for GetHostContainersInternalIP() @@ -28,14 +30,30 @@ type HostContainersInternalOptions struct { PreferIP string } +// Lookup "host.containers.internal" dns name so we can add it to /etc/hosts when running inside podman machine. +var machineHostContainersInternalIP = sync.OnceValue(func() string { + var errMsg string + addrs, err := net.LookupIP(HostContainersInternal) + if err == nil { + if len(addrs) > 0 { + return addrs[0].String() + } + errMsg = "lookup result is empty" + } else { + errMsg = err.Error() + } + logrus.Warnf("Failed to resolve %s for the host entry ip address: %s", HostContainersInternal, errMsg) + return "" +}) + // GetHostContainersInternalIP returns the host.containers.internal ip func GetHostContainersInternalIP(opts HostContainersInternalOptions) string { switch opts.Conf.Containers.HostContainersInternalIP { case "": - // if empty (default) we will automatically choose one below - // if machine using gvproxy we let the gvproxy dns server handle the dns name so do not add it + // If empty (default) we will automatically choose one below. + // If machine using gvproxy we let the gvproxy dns server handle resolve the name and then use that ip. if machine.IsGvProxyBased() { - return "" + return machineHostContainersInternalIP() } case "none": return "" diff --git a/vendor/github.com/containers/common/pkg/config/containers.conf b/vendor/github.com/containers/common/pkg/config/containers.conf index 5bc6fa1444..46dd4a5ba2 100644 --- a/vendor/github.com/containers/common/pkg/config/containers.conf +++ b/vendor/github.com/containers/common/pkg/config/containers.conf @@ -588,6 +588,7 @@ default_sysctls = [ # #cdi_spec_dirs = [ # "/etc/cdi", +# "/var/run/cdi", #] # Manifest Type (oci, v2s2, or v2s1) to use when pulling, pushing, building diff --git a/vendor/github.com/containers/common/pkg/config/containers.conf-freebsd b/vendor/github.com/containers/common/pkg/config/containers.conf-freebsd index 205ce433f1..cfe8799667 100644 --- a/vendor/github.com/containers/common/pkg/config/containers.conf-freebsd +++ b/vendor/github.com/containers/common/pkg/config/containers.conf-freebsd @@ -437,6 +437,7 @@ default_sysctls = [ # #cdi_spec_dirs = [ # "/etc/cdi", +# "/var/run/cdi", #] # Manifest Type (oci, v2s2, or v2s1) to use when pulling, pushing, building diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go index fd0962bff5..a8b44b162b 100644 --- a/vendor/github.com/containers/common/pkg/config/default.go +++ b/vendor/github.com/containers/common/pkg/config/default.go @@ -102,7 +102,7 @@ var ( // DefaultHooksDirs defines the default hooks directory. DefaultHooksDirs = []string{"/usr/share/containers/oci/hooks.d"} // DefaultCdiSpecDirs defines the default cdi spec directories. - DefaultCdiSpecDirs = []string{"/etc/cdi"} + DefaultCdiSpecDirs = []string{"/etc/cdi", "/var/run/cdi"} // DefaultCapabilities is the default for the default_capabilities option in the containers.conf file. DefaultCapabilities = []string{ "CAP_CHOWN", diff --git a/vendor/modules.txt b/vendor/modules.txt index 35cab20b38..e2dde3bf11 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -141,7 +141,7 @@ github.com/containers/buildah/pkg/sshagent github.com/containers/buildah/pkg/util github.com/containers/buildah/pkg/volumes github.com/containers/buildah/util -# github.com/containers/common v0.63.2-0.20250701090630-c156ac84320e +# github.com/containers/common v0.63.2-0.20250707185859-2b4e95a951de ## explicit; go 1.23.3 github.com/containers/common/internal github.com/containers/common/internal/attributedstring @@ -214,7 +214,7 @@ github.com/containers/conmon/runner/config # github.com/containers/gvisor-tap-vsock v0.8.6 ## explicit; go 1.23.0 github.com/containers/gvisor-tap-vsock/pkg/types -# github.com/containers/image/v5 v5.35.1-0.20250703163716-35325479c8f4 +# github.com/containers/image/v5 v5.35.1-0.20250707180819-778317a88563 ## explicit; go 1.23.3 github.com/containers/image/v5/copy github.com/containers/image/v5/directory