mirror of
https://github.com/containers/podman.git
synced 2025-08-14 11:01:35 +08:00
new "image" mount type
Add a new "image" mount type to `--mount`. The source of the mount is the name or ID of an image. The destination is the path inside the container. Image mounts further support an optional `rw,readwrite` parameter which if set to "true" will yield the mount writable inside the container. Note that no changes are propagated to the image mount on the host (which in any case is read only). Mounts are overlay mounts. To support read-only overlay mounts, vendor a non-release version of Buildah. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
54
vendor/github.com/fsouza/go-dockerclient/container_inspect.go
generated
vendored
Normal file
54
vendor/github.com/fsouza/go-dockerclient/container_inspect.go
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// InspectContainer returns information about a container by its ID.
|
||||
//
|
||||
// Deprecated: Use InspectContainerWithOptions instead.
|
||||
func (c *Client) InspectContainer(id string) (*Container, error) {
|
||||
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.
|
||||
//
|
||||
// Deprecated: Use InspectContainerWithOptions instead.
|
||||
//nolint:golint
|
||||
func (c *Client) InspectContainerWithContext(id string, ctx context.Context) (*Container, error) {
|
||||
return c.InspectContainerWithOptions(InspectContainerOptions{ID: id, Context: ctx})
|
||||
}
|
||||
|
||||
// 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: opts.ID}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
var container Container
|
||||
if err := json.NewDecoder(resp.Body).Decode(&container); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user