mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daff039049
The goal of this refactor is to make it easier to integrate buildkit and containerd snapshotters. Commit is used from two places (api and build), each calls it with distinct arguments. Refactored to pull out the common commit logic and provide different interfaces for each consumer. Signed-off-by: Daniel Nephin <dnephin@docker.com>
57 lines
1.8 KiB
Go
57 lines
1.8 KiB
Go
package types
|
|
|
|
import (
|
|
"github.com/docker/docker/api/types/container"
|
|
"github.com/docker/docker/api/types/network"
|
|
)
|
|
|
|
// 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
|
|
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.
|
|
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
|
|
WorkingDir string // Working directory
|
|
Cmd []string // Execution commands and args
|
|
}
|
|
|
|
// PluginRmConfig holds arguments for plugin remove.
|
|
type PluginRmConfig struct {
|
|
ForceRemove bool
|
|
}
|
|
|
|
// PluginEnableConfig holds arguments for plugin enable
|
|
type PluginEnableConfig struct {
|
|
Timeout int
|
|
}
|
|
|
|
// PluginDisableConfig holds arguments for plugin disable.
|
|
type PluginDisableConfig struct {
|
|
ForceDisable bool
|
|
}
|