summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go.mod2
-rw-r--r--go.sum3
-rw-r--r--vendor/github.com/containers/common/libimage/image_tree.go4
-rw-r--r--vendor/github.com/containers/common/libimage/pull.go19
-rw-r--r--vendor/github.com/containers/common/pkg/config/config.go11
-rw-r--r--vendor/github.com/containers/common/pkg/config/containers.conf7
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go2
-rw-r--r--vendor/github.com/containers/common/version/version.go2
-rw-r--r--vendor/modules.txt2
9 files changed, 46 insertions, 6 deletions
diff --git a/go.mod b/go.mod
index 6a54d363c..4b03125bd 100644
--- a/go.mod
+++ b/go.mod
@@ -12,7 +12,7 @@ require (
github.com/containernetworking/cni v0.8.1
github.com/containernetworking/plugins v0.9.1
github.com/containers/buildah v1.21.1-0.20210707133512-2eb97b499d74
- github.com/containers/common v0.40.2-0.20210707094508-0a4a1906d4b2
+ github.com/containers/common v0.41.1-0.20210716140645-ffcfe1ff6e70
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/image/v5 v5.13.2
github.com/containers/ocicrypt v1.1.2
diff --git a/go.sum b/go.sum
index 395a0eb41..6b9030d7e 100644
--- a/go.sum
+++ b/go.sum
@@ -240,8 +240,9 @@ github.com/containernetworking/plugins v0.9.1 h1:FD1tADPls2EEi3flPc2OegIY1M9pUa9
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
github.com/containers/buildah v1.21.1-0.20210707133512-2eb97b499d74 h1:u+Wk1Gv+UgOR0AHmlpbH+ZsdfZt7vkGuiKCyhbI4Ga0=
github.com/containers/buildah v1.21.1-0.20210707133512-2eb97b499d74/go.mod h1:P0rxPkI7440rWVMkbPkSHX4j1PxjOcx+cY8QrqYgdLE=
-github.com/containers/common v0.40.2-0.20210707094508-0a4a1906d4b2 h1:2ApmOS9jSnJXuSOkZNEAZ7j0/9i8zjoi67b/UpUjPxY=
github.com/containers/common v0.40.2-0.20210707094508-0a4a1906d4b2/go.mod h1:thow5Jn7O+rP01njI9COQ16L9g/KQ1LcMcYqP2NhYCU=
+github.com/containers/common v0.41.1-0.20210716140645-ffcfe1ff6e70 h1:9kKqg10PfrLQdsN4lw/n8XIuqLk43JwwAcE4klCvOsI=
+github.com/containers/common v0.41.1-0.20210716140645-ffcfe1ff6e70/go.mod h1:w0CLPB8nH75msgISbE/z8TMIxK9disFsmvFNd2SDid8=
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/image/v5 v5.13.2 h1:AgYunV/9d2fRkrmo23wH2MkqeHolFd6oQCkK+1PpuFA=
diff --git a/vendor/github.com/containers/common/libimage/image_tree.go b/vendor/github.com/containers/common/libimage/image_tree.go
index b8b9cb216..d48aeeada 100644
--- a/vendor/github.com/containers/common/libimage/image_tree.go
+++ b/vendor/github.com/containers/common/libimage/image_tree.go
@@ -80,6 +80,10 @@ func (i *Image) Tree(traverseChildren bool) (string, error) {
}
func imageTreeTraverseChildren(node *layerNode, parent gotree.Tree) error {
+ if node.layer == nil {
+ return nil
+ }
+
var tags string
repoTags, err := node.repoTags()
if err != nil {
diff --git a/vendor/github.com/containers/common/libimage/pull.go b/vendor/github.com/containers/common/libimage/pull.go
index fbe3b466d..71cec021b 100644
--- a/vendor/github.com/containers/common/libimage/pull.go
+++ b/vendor/github.com/containers/common/libimage/pull.go
@@ -394,8 +394,23 @@ func (r *Runtime) copySingleImageFromRegistry(ctx context.Context, imageName str
// very likely a bug but a consistent one in Podman/Buildah and should
// be addressed at a later point.
if pullPolicy != config.PullPolicyAlways {
- logrus.Debugf("Enforcing pull policy to %q to support custom platform (arch: %q, os: %q, variant: %q)", "always", options.Architecture, options.OS, options.Variant)
- pullPolicy = config.PullPolicyAlways
+ switch {
+ // User input clearly refer to a local image.
+ case strings.HasPrefix(imageName, "localhost/"):
+ logrus.Debugf("Enforcing pull policy to %q to support custom platform (arch: %q, os: %q, variant: %q)", "never", options.Architecture, options.OS, options.Variant)
+ pullPolicy = config.PullPolicyNever
+
+ // Image resolved to a local one, so let's still have a
+ // look at the registries or aliases but use it
+ // otherwise.
+ case strings.HasPrefix(resolvedImageName, "localhost/"):
+ logrus.Debugf("Enforcing pull policy to %q to support custom platform (arch: %q, os: %q, variant: %q)", "newer", options.Architecture, options.OS, options.Variant)
+ pullPolicy = config.PullPolicyNewer
+
+ default:
+ logrus.Debugf("Enforcing pull policy to %q to support custom platform (arch: %q, os: %q, variant: %q)", "always", options.Architecture, options.OS, options.Variant)
+ pullPolicy = config.PullPolicyAlways
+ }
}
}
diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go
index 68076b117..84876026d 100644
--- a/vendor/github.com/containers/common/pkg/config/config.go
+++ b/vendor/github.com/containers/common/pkg/config/config.go
@@ -158,6 +158,13 @@ type ContainersConfig struct {
// PidNS indicates how to create a pid namespace for the container
PidNS string `toml:"pidns,omitempty"`
+ // Copy the content from the underlying image into the newly created
+ // volume when the container is created instead of when it is started.
+ // If false, the container engine will not copy the content until
+ // the container is started. Setting it to true may have negative
+ // performance implications.
+ PrepareVolumeOnCreate bool `toml:"prepare_volume_on_create,omitempty"`
+
// RootlessNetworking depicts the "kind" of networking for rootless
// containers. Valid options are `slirp4netns` and `cni`. Default is
// `slirp4netns`
@@ -384,6 +391,10 @@ type EngineConfig struct {
// will refer to the plugin as) mapped to a path, which must point to a
// Unix socket that conforms to the Volume Plugin specification.
VolumePlugins map[string]string `toml:"volume_plugins,omitempty"`
+
+ // ChownCopiedFiles tells the container engine whether to chown files copied
+ // into a container to the container's primary uid/gid.
+ ChownCopiedFiles bool `toml:"chown_copied_files"`
}
// SetOptions contains a subset of options in a Config. It's used to indicate if
diff --git a/vendor/github.com/containers/common/pkg/config/containers.conf b/vendor/github.com/containers/common/pkg/config/containers.conf
index 41f3c784a..f429b96ed 100644
--- a/vendor/github.com/containers/common/pkg/config/containers.conf
+++ b/vendor/github.com/containers/common/pkg/config/containers.conf
@@ -189,6 +189,13 @@ default_sysctls = [
#
# pids_limit = 2048
+# Copy the content from the underlying image into the newly created volume
+# when the container is created instead of when it is started. If false,
+# the container engine will not copy the content until the container is started.
+# Setting it to true may have negative performance implications.
+#
+# prepare_volume_on_create = false
+
# Indicates the networking to be used for rootless containers
# rootless_networking = "slirp4netns"
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index 5abb6326f..a16dd0e02 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -340,6 +340,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
c.LockType = "shm"
c.MachineEnabled = false
+ c.ChownCopiedFiles = true
+
return c, nil
}
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index 8907e21ab..47dca527c 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
package version
// Version is the version of the build.
-const Version = "0.40.2-dev"
+const Version = "0.41.1-dev"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 30459a32a..e72a9b185 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -93,7 +93,7 @@ github.com/containers/buildah/pkg/overlay
github.com/containers/buildah/pkg/parse
github.com/containers/buildah/pkg/rusage
github.com/containers/buildah/util
-# github.com/containers/common v0.40.2-0.20210707094508-0a4a1906d4b2
+# github.com/containers/common v0.41.1-0.20210716140645-ffcfe1ff6e70
github.com/containers/common/libimage
github.com/containers/common/libimage/manifests
github.com/containers/common/pkg/apparmor