mirror of
https://github.com/containers/podman.git
synced 2026-03-29 03:52:19 -04:00
Update to the latest c/{common,image} which inclused an update to
docker v28, that update is NOT backwards compatible so I had to fix a
few types.
NOTE: handler.ExecCreateConfig is used directly by the bindings. Thus
this is an API break for pkg/bindings. Including docker types as part of
any stable pkg/bindings API was a very bad idea.
I see no way to avoid that unless we never want to docker v28, which is
not easy as the update comes in from c/image and maybe other packages.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
25 lines
561 B
Go
25 lines
561 B
Go
package client // import "github.com/docker/docker/client"
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
"net/http"
|
|
|
|
"github.com/docker/docker/api/types/registry"
|
|
)
|
|
|
|
// PluginPush pushes a plugin to a registry
|
|
func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) {
|
|
name, err := trimID("plugin", name)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, http.Header{
|
|
registry.AuthHeader: {registryAuth},
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return resp.Body, nil
|
|
}
|