From 947aefda4fc744b63007624e7c89396a975dd6fb Mon Sep 17 00:00:00 2001 From: Aditya Rajan Date: Mon, 8 Nov 2021 12:31:10 +0530 Subject: [PATCH] podman-remote: default PullPolicy must be missing instead of empty str If registry is remote default pull policy must be `missing` instead of remote. Since `empty str == pullpolicy {always}` for more context on this behaviour check https://github.com/containers/podman/pull/10739 [NO TESTS NEEDED] Signed-off-by: Aditya Rajan --- cmd/podman/common/create_opts.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go index 6283eb28e1..045291d12d 100644 --- a/cmd/podman/common/create_opts.go +++ b/cmd/podman/common/create_opts.go @@ -503,7 +503,11 @@ func policy() string { if !registry.IsRemote() { return containerConfig.Engine.PullPolicy } - return "" + // If registry is remote default pull policy + // must be "missing" instead of empty string. + // since empty string == PullPolicy {always} + // more context: https://github.com/containers/podman/pull/10739 + return config.DefaultPullPolicy } func shmSize() string {