bindings: containers/commit uses directly Docker type
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
9f0ea0dc87
commit
2d8231efe8
|
|
@ -11,26 +11,26 @@ import (
|
|||
|
||||
"github.com/containers/podman/v4/pkg/bindings"
|
||||
"github.com/containers/podman/v4/pkg/bindings/images"
|
||||
"github.com/containers/podman/v4/pkg/domain/entities"
|
||||
"github.com/containers/storage/pkg/regexp"
|
||||
dockerAPI "github.com/docker/docker/api/types"
|
||||
)
|
||||
|
||||
var iidRegex = regexp.Delayed(`^[0-9a-f]{12}`)
|
||||
|
||||
// Commit creates a container image from a container. The container is defined by nameOrID. Use
|
||||
// the CommitOptions for finer grain control on characteristics of the resulting image.
|
||||
func Commit(ctx context.Context, nameOrID string, options *CommitOptions) (entities.IDResponse, error) {
|
||||
func Commit(ctx context.Context, nameOrID string, options *CommitOptions) (dockerAPI.IDResponse, error) {
|
||||
if options == nil {
|
||||
options = new(CommitOptions)
|
||||
}
|
||||
id := entities.IDResponse{}
|
||||
id := dockerAPI.IDResponse{}
|
||||
conn, err := bindings.GetClient(ctx)
|
||||
if err != nil {
|
||||
return id, err
|
||||
}
|
||||
params, err := options.ToParams()
|
||||
if err != nil {
|
||||
return entities.IDResponse{}, err
|
||||
return dockerAPI.IDResponse{}, err
|
||||
}
|
||||
params.Set("container", nameOrID)
|
||||
var requestBody io.Reader
|
||||
|
|
|
|||
Loading…
Reference in New Issue