From 6003033adae775f1d725b05231a246a4462ae669 Mon Sep 17 00:00:00 2001 From: TomSweeneyRedHat Date: Wed, 13 Nov 2019 10:30:08 -0500 Subject: Bump to Buildah v1.11.5 Bump to Buildah v1.11.5. Most notably changes to the podman build `--pull` functionality. `--pull=true` and `--pull=false` now work as Docker does, `--pull-never` added to supply the functionality of the old `--pull=false`. Signed-off-by: TomSweeneyRedHat --- .../github.com/fsouza/go-dockerclient/container.go | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'vendor/github.com/fsouza/go-dockerclient/container.go') diff --git a/vendor/github.com/fsouza/go-dockerclient/container.go b/vendor/github.com/fsouza/go-dockerclient/container.go index 0a8ab361c..f6bfb59dc 100644 --- a/vendor/github.com/fsouza/go-dockerclient/container.go +++ b/vendor/github.com/fsouza/go-dockerclient/container.go @@ -546,26 +546,31 @@ func (c *Client) RenameContainer(opts RenameContainerOptions) error { // InspectContainer returns information about a container by its ID. // -// See https://goo.gl/FaI5JT for more details. +// Deprecated: Use InspectContainerWithOptions instead. func (c *Client) InspectContainer(id string) (*Container, error) { - return c.inspectContainer(id, doOptions{}) + return c.InspectContainerWithOptions(InspectContainerOptions{ID: id}) } // InspectContainerWithContext returns information about a container by its ID. // The context object can be used to cancel the inspect request. // -// See https://goo.gl/FaI5JT for more details. +// Deprecated: Use InspectContainerWithOptions instead. //nolint:golint func (c *Client) InspectContainerWithContext(id string, ctx context.Context) (*Container, error) { - return c.inspectContainer(id, doOptions{context: ctx}) + return c.InspectContainerWithOptions(InspectContainerOptions{ID: id, Context: ctx}) } -func (c *Client) inspectContainer(id string, opts doOptions) (*Container, error) { - path := "/containers/" + id + "/json" - resp, err := c.do(http.MethodGet, path, opts) +// InspectContainerWithOptions returns information about a container by its ID. +// +// See https://goo.gl/FaI5JT for more details. +func (c *Client) InspectContainerWithOptions(opts InspectContainerOptions) (*Container, error) { + path := "/containers/" + opts.ID + "/json?" + queryString(opts) + resp, err := c.do(http.MethodGet, path, doOptions{ + context: opts.Context, + }) if err != nil { if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound { - return nil, &NoSuchContainer{ID: id} + return nil, &NoSuchContainer{ID: opts.ID} } return nil, err } @@ -577,6 +582,15 @@ func (c *Client) inspectContainer(id string, opts doOptions) (*Container, error) return &container, nil } +// InspectContainerOptions specifies parameters for InspectContainerWithOptions. +// +// See https://goo.gl/FaI5JT for more details. +type InspectContainerOptions struct { + Context context.Context + ID string `qs:"-"` + Size bool +} + // ContainerChanges returns changes in the filesystem of the given container. // // See https://goo.gl/15KKzh for more details. -- cgit v1.2.3-54-g00ecf