diff options
author | TomSweeneyRedHat <tsweeney@redhat.com> | 2019-11-13 10:30:08 -0500 |
---|---|---|
committer | TomSweeneyRedHat <tsweeney@redhat.com> | 2019-11-13 10:57:19 -0500 |
commit | 6003033adae775f1d725b05231a246a4462ae669 (patch) | |
tree | c570c523df92c3c0fb4b704c5c45b0de6603b7d6 /vendor/github.com/fsouza/go-dockerclient/container.go | |
parent | de32b89eff0928abdef9d85a420b65d8865e737e (diff) | |
download | podman-6003033adae775f1d725b05231a246a4462ae669.tar.gz podman-6003033adae775f1d725b05231a246a4462ae669.tar.bz2 podman-6003033adae775f1d725b05231a246a4462ae669.zip |
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 <tsweeney@redhat.com>
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/container.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/container.go | 30 |
1 files changed, 22 insertions, 8 deletions
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. |