mirror of https://github.com/docker/compose.git
Remove not implemented options
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
b289138ca9
commit
7bed2343e6
|
@ -18,7 +18,6 @@ package compose
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/compose-spec/compose-go/types"
|
"github.com/compose-spec/compose-go/types"
|
||||||
)
|
)
|
||||||
|
@ -73,21 +72,8 @@ type ConvertOptions struct {
|
||||||
|
|
||||||
// RunOptions holds all flags for compose run
|
// RunOptions holds all flags for compose run
|
||||||
type RunOptions struct {
|
type RunOptions struct {
|
||||||
Name string
|
Name string
|
||||||
Command []string
|
Command []string
|
||||||
WorkingDir string
|
|
||||||
Environment []string
|
|
||||||
Publish []string
|
|
||||||
Labels []string
|
|
||||||
Volumes []string
|
|
||||||
Remove bool
|
|
||||||
NoDeps bool
|
|
||||||
LogConsumer LogConsumer
|
|
||||||
|
|
||||||
Detach bool
|
|
||||||
|
|
||||||
Stdout io.ReadCloser
|
|
||||||
Stdin io.WriteCloser
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PortPublisher hold status about published port
|
// PortPublisher hold status about published port
|
||||||
|
|
|
@ -36,10 +36,6 @@ type runOptions struct {
|
||||||
ConfigPaths []string
|
ConfigPaths []string
|
||||||
Environment []string
|
Environment []string
|
||||||
Detach bool
|
Detach bool
|
||||||
Publish []string
|
|
||||||
Labels []string
|
|
||||||
Volumes []string
|
|
||||||
NoDeps bool
|
|
||||||
Remove bool
|
Remove bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,11 +55,6 @@ func runCommand() *cobra.Command {
|
||||||
}
|
}
|
||||||
runCmd.Flags().StringVar(&opts.WorkingDir, "workdir", "", "Work dir")
|
runCmd.Flags().StringVar(&opts.WorkingDir, "workdir", "", "Work dir")
|
||||||
runCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
runCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
||||||
runCmd.Flags().StringArrayVarP(&opts.Publish, "publish", "p", []string{}, "Publish a container's port(s). [HOST_PORT:]CONTAINER_PORT")
|
|
||||||
runCmd.Flags().StringVar(&opts.Name, "name", "", "Assign a name to the container")
|
|
||||||
runCmd.Flags().BoolVar(&opts.NoDeps, "no-deps", false, "Don't start linked services.")
|
|
||||||
runCmd.Flags().StringArrayVarP(&opts.Labels, "label", "l", []string{}, "Set meta data on a container")
|
|
||||||
runCmd.Flags().StringArrayVarP(&opts.Volumes, "volume", "v", []string{}, "Volume. Ex: storageaccount/my_share[:/absolute/path/to/target][:ro]")
|
|
||||||
runCmd.Flags().BoolVarP(&opts.Detach, "detach", "d", false, "Run container in background and print container ID")
|
runCmd.Flags().BoolVarP(&opts.Detach, "detach", "d", false, "Run container in background and print container ID")
|
||||||
runCmd.Flags().StringArrayVarP(&opts.Environment, "env", "e", []string{}, "Set environment variables")
|
runCmd.Flags().StringArrayVarP(&opts.Environment, "env", "e", []string{}, "Set environment variables")
|
||||||
runCmd.Flags().BoolVar(&opts.Remove, "rm", false, "Automatically remove the container when it exits")
|
runCmd.Flags().BoolVar(&opts.Remove, "rm", false, "Automatically remove the container when it exits")
|
||||||
|
|
|
@ -62,7 +62,6 @@ func (s *composeService) CreateOneOffContainer(ctx context.Context, project *typ
|
||||||
|
|
||||||
func (s *composeService) Run(ctx context.Context, container string, detach bool) error {
|
func (s *composeService) Run(ctx context.Context, container string, detach bool) error {
|
||||||
if detach {
|
if detach {
|
||||||
// start container
|
|
||||||
return s.apiClient.ContainerStart(ctx, container, apitypes.ContainerStartOptions{})
|
return s.apiClient.ContainerStart(ctx, container, apitypes.ContainerStartOptions{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue