From cf51c7ed9f955390a0e417f208046e0b8fbadb26 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 15 Jan 2021 03:49:42 -0500 Subject: Allow podman push to push manifest lists When doing a podman images, manifests lists look just like images, so it is logical that users would assume that they can just podman push them to a registry. The problem is we throw out weird errors when this happens and users need to somehow figure out this is a manifest list rather then an image, and frankly the user will not understand the difference. This PR will make podman push just do the right thing, by failing over and attempting to push the manifest if it fails to push the image. Fix up handling of manifest push Protocol should bring back a digest string, which can either be printed or stored in a file. We should not reimplement the manifest push setup code in the tunnel code but take advantage of the api path, to make sure remote and local work the same way. Signed-off-by: Daniel J Walsh --- cmd/podman/images/push.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/podman/images') diff --git a/cmd/podman/images/push.go b/cmd/podman/images/push.go index d82083cd8..d53a9c066 100644 --- a/cmd/podman/images/push.go +++ b/cmd/podman/images/push.go @@ -75,6 +75,8 @@ func init() { func pushFlags(cmd *cobra.Command) { flags := cmd.Flags() + // For now default All flag to true, for pushing of manifest lists + pushOptions.All = true authfileFlagName := "authfile" flags.StringVar(&pushOptions.Authfile, authfileFlagName, auth.GetDefaultAuthFile(), "Path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override") _ = cmd.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault) -- cgit v1.2.3-54-g00ecf