mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
15aa2a663b
Implement configurable detach keys (for `attach`, exec`, `run` and `start`) using the client-side configuration - Adds a `--detach-keys` flag to `attach`, `exec`, `run` and `start` commands. - Adds a new configuration field (in `~/.docker/config.json`) to configure the default escape keys for docker client. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
50 lines
1.7 KiB
Go
50 lines
1.7 KiB
Go
package types
|
|
|
|
import "github.com/docker/docker/api/types/container"
|
|
|
|
// 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
|
|
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
|
|
}
|
|
|
|
// ContainerCommitConfig contains build configs for commit operation,
|
|
// and is used when making a commit with the current state of the container.
|
|
type ContainerCommitConfig struct {
|
|
Pause bool
|
|
Repo string
|
|
Tag string
|
|
Author string
|
|
Comment string
|
|
// merge container config into commit config before commit
|
|
MergeConfigs bool
|
|
Config *container.Config
|
|
}
|
|
|
|
// ExecConfig is a small subset of the Config struct that hold 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.
|
|
Container string // Name of the container (to execute in)
|
|
AttachStdin bool // Attach the standard input, makes possible user interaction
|
|
AttachStderr bool // Attach the standard output
|
|
AttachStdout bool // Attach the standard error
|
|
Detach bool // Execute in detach mode
|
|
DetachKeys string // Escape keys for detach
|
|
Cmd []string // Execution commands and args
|
|
}
|