2018-02-05 21:05:59 +00:00
|
|
|
package types // import "github.com/docker/docker/api/types"
|
2016-09-06 18:18:12 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/docker/docker/api/types/container"
|
|
|
|
"github.com/docker/docker/api/types/network"
|
2023-05-08 09:57:52 +00:00
|
|
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
2016-09-06 18:18:12 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// configs holds structs used for internal communication between the
|
|
|
|
// frontend (such as an http server) and the backend (such as the
|
|
|
|
// docker daemon).
|
|
|
|
|
|
|
|
// ContainerCreateConfig is the parameter set to ContainerCreate()
|
|
|
|
type ContainerCreateConfig struct {
|
|
|
|
Name string
|
|
|
|
Config *container.Config
|
|
|
|
HostConfig *container.HostConfig
|
|
|
|
NetworkingConfig *network.NetworkingConfig
|
2023-05-08 09:57:52 +00:00
|
|
|
Platform *ocispec.Platform
|
2016-09-06 18:18:12 +00:00
|
|
|
AdjustCPUShares bool
|
|
|
|
}
|
|
|
|
|
|
|
|
// ContainerRmConfig holds arguments for the container remove
|
|
|
|
// operation. This struct is used to tell the backend what operations
|
|
|
|
// to perform.
|
|
|
|
type ContainerRmConfig struct {
|
|
|
|
ForceRemove, RemoveVolume, RemoveLink bool
|
|
|
|
}
|
|
|
|
|
|
|
|
// ExecConfig is a small subset of the Config struct that holds the configuration
|
|
|
|
// for the exec feature of docker.
|
|
|
|
type ExecConfig struct {
|
|
|
|
User string // User that will run the command
|
|
|
|
Privileged bool // Is the container in privileged mode
|
|
|
|
Tty bool // Attach standard streams to a tty.
|
2022-06-15 07:28:20 +00:00
|
|
|
ConsoleSize *[2]uint `json:",omitempty"` // Initial console size [height, width]
|
2016-09-06 18:18:12 +00:00
|
|
|
AttachStdin bool // Attach the standard input, makes possible user interaction
|
|
|
|
AttachStderr bool // Attach the standard error
|
|
|
|
AttachStdout bool // Attach the standard output
|
|
|
|
Detach bool // Execute in detach mode
|
|
|
|
DetachKeys string // Escape keys for detach
|
|
|
|
Env []string // Environment variables
|
2017-12-01 08:06:07 +00:00
|
|
|
WorkingDir string // Working directory
|
2016-09-06 18:18:12 +00:00
|
|
|
Cmd []string // Execution commands and args
|
|
|
|
}
|
|
|
|
|
2016-12-20 16:26:58 +00:00
|
|
|
// PluginRmConfig holds arguments for plugin remove.
|
2016-09-06 18:18:12 +00:00
|
|
|
type PluginRmConfig struct {
|
|
|
|
ForceRemove bool
|
|
|
|
}
|
2016-11-21 17:24:01 +00:00
|
|
|
|
2016-12-20 16:26:58 +00:00
|
|
|
// PluginEnableConfig holds arguments for plugin enable
|
2016-11-21 17:24:01 +00:00
|
|
|
type PluginEnableConfig struct {
|
|
|
|
Timeout int
|
|
|
|
}
|
2016-12-20 16:26:58 +00:00
|
|
|
|
|
|
|
// PluginDisableConfig holds arguments for plugin disable.
|
|
|
|
type PluginDisableConfig struct {
|
|
|
|
ForceDisable bool
|
|
|
|
}
|
2018-05-23 14:03:02 +00:00
|
|
|
|
|
|
|
// NetworkListConfig stores the options available for listing networks
|
|
|
|
type NetworkListConfig struct {
|
|
|
|
// TODO(@cpuguy83): naming is hard, this is pulled from what was being used in the router before moving here
|
|
|
|
Detailed bool
|
|
|
|
Verbose bool
|
|
|
|
}
|