Documentation
¶
Index ¶
- Constants
- func Adapt(fn Command) func(cmd *cobra.Command, args []string) error
- func AdaptCmd(fn CobraCommand) func(cmd *cobra.Command, args []string) error
- func RootCommand(dockerCli command.Cli, backend api.Service) *cobra.Command
- func RunningAsStandalone() bool
- type CobraCommand
- type Command
- type ProjectFunc
- type ProjectOptions
- func (o *ProjectOptions) ToProject(dockerCli command.Cli, services []string, po ...cli.ProjectOptionsFn) (*types.Project, error)
- func (o *ProjectOptions) WithProject(fn ProjectFunc, dockerCli command.Cli) func(cmd *cobra.Command, args []string) error
- func (o *ProjectOptions) WithServices(dockerCli command.Cli, fn ProjectServicesFunc) func(cmd *cobra.Command, args []string) error
- type ProjectServicesFunc
Constants ¶
View Source
const ( // ComposeParallelLimit set the limit running concurrent operation on docker engine ComposeParallelLimit = "COMPOSE_PARALLEL_LIMIT" // ComposeProjectName define the project name to be used, instead of guessing from parent directory ComposeProjectName = "COMPOSE_PROJECT_NAME" // ComposeCompatibility try to mimic compose v1 as much as possible ComposeCompatibility = "COMPOSE_COMPATIBILITY" // ComposeRemoveOrphans remove “orphaned" containers, i.e. containers tagged for current project but not declared as service ComposeRemoveOrphans = "COMPOSE_REMOVE_ORPHANS" // ComposeIgnoreOrphans ignore "orphaned" containers ComposeIgnoreOrphans = "COMPOSE_IGNORE_ORPHANS" // ComposeEnvFiles defines the env files to use if --env-file isn't used ComposeEnvFiles = "COMPOSE_ENV_FILES" )
View Source
const PluginName = "compose"
PluginName is the name of the plugin
Variables ¶
This section is empty.
Functions ¶
func AdaptCmd ¶
func AdaptCmd(fn CobraCommand) func(cmd *cobra.Command, args []string) error
AdaptCmd adapt a CobraCommand func to cobra library
func RootCommand ¶
RootCommand returns the compose command with its child commands
func RunningAsStandalone ¶ added in v2.0.1
func RunningAsStandalone() bool
RunningAsStandalone detects when running as a standalone program
Types ¶
type CobraCommand ¶
CobraCommand defines a cobra command function
type ProjectFunc ¶
ProjectFunc does stuff within a types.Project
type ProjectOptions ¶ added in v2.14.2
type ProjectOptions struct {
ProjectName string
Profiles []string
ConfigPaths []string
WorkDir string
ProjectDir string
EnvFiles []string
Compatibility bool
Progress string
Offline bool
}
func (*ProjectOptions) ToProject ¶ added in v2.14.2
func (o *ProjectOptions) ToProject(dockerCli command.Cli, services []string, po ...cli.ProjectOptionsFn) (*types.Project, error)
func (*ProjectOptions) WithProject ¶ added in v2.14.2
func (o *ProjectOptions) WithProject(fn ProjectFunc, dockerCli command.Cli) func(cmd *cobra.Command, args []string) error
WithProject creates a cobra run command from a ProjectFunc based on configured project options and selected services
func (*ProjectOptions) WithServices ¶ added in v2.14.2
func (o *ProjectOptions) WithServices(dockerCli command.Cli, fn ProjectServicesFunc) func(cmd *cobra.Command, args []string) error
WithServices creates a cobra run command from a ProjectFunc based on configured project options and selected services
Source Files
¶
Click to show internal directories.
Click to hide internal directories.