package compose
import "github.com/docker/compose/v2/cmd/compose"
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(streams command.Cli, backend api.Service) *cobra.Command
- func RunningAsStandalone() bool
- type CobraCommand
- type Command
- type ProjectFunc
- type ProjectOptions
- func (o *ProjectOptions) ToProject(services []string, po ...cli.ProjectOptionsFn) (*types.Project, error)
- func (o *ProjectOptions) WithProject(fn ProjectFunc) func(cmd *cobra.Command, args []string) error
- func (o *ProjectOptions) WithServices(fn ProjectServicesFunc) func(cmd *cobra.Command, args []string) error
- type ProjectServicesFunc
Constants ¶
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" )
const PluginName = "compose"
PluginName is the name of the plugin
Functions ¶
func Adapt ¶
Adapt a Command func to cobra library
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 ¶
func RunningAsStandalone() bool
RunningAsStandalone detects when running as a standalone program
Types ¶
type CobraCommand ¶
CobraCommand defines a cobra command function
type Command ¶
Command defines a compose CLI command as a func with args
type ProjectFunc ¶
ProjectFunc does stuff within a types.Project
type ProjectOptions ¶
type ProjectOptions struct { ProjectName string Profiles []string ConfigPaths []string WorkDir string ProjectDir string EnvFiles []string Compatibility bool }
func (*ProjectOptions) ToProject ¶
func (o *ProjectOptions) ToProject(services []string, po ...cli.ProjectOptionsFn) (*types.Project, error)
func (*ProjectOptions) WithProject ¶
func (o *ProjectOptions) WithProject(fn ProjectFunc) 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 ¶
func (o *ProjectOptions) WithServices(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
type ProjectServicesFunc ¶
ProjectServicesFunc does stuff within a types.Project and a selection of services
Source Files ¶
alpha.go build.go completion.go compose.go config.go cp.go create.go down.go events.go exec.go images.go kill.go list.go logs.go pause.go port.go ps.go pull.go push.go remove.go restart.go run.go start.go stop.go top.go up.go version.go viz.go watch.go
- Version
- v2.19.0
- Published
- Jun 21, 2023
- Platform
- js/wasm
- Imports
- 41 packages
- Last checked
- 5 minutes ago –
Tools for package owners.