diff --git a/api/compose/api.go b/api/compose/api.go index 1552cc697..b0c57d4ce 100644 --- a/api/compose/api.go +++ b/api/compose/api.go @@ -18,7 +18,6 @@ package compose import ( "context" - "io" "github.com/compose-spec/compose-go/types" ) @@ -73,21 +72,8 @@ type ConvertOptions struct { // RunOptions holds all flags for compose run type RunOptions struct { - Name 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 + Name string + Command []string } // PortPublisher hold status about published port diff --git a/cli/cmd/compose/run.go b/cli/cmd/compose/run.go index a7bd4fac7..76858a451 100644 --- a/cli/cmd/compose/run.go +++ b/cli/cmd/compose/run.go @@ -36,10 +36,6 @@ type runOptions struct { ConfigPaths []string Environment []string Detach bool - Publish []string - Labels []string - Volumes []string - NoDeps bool Remove bool } @@ -59,11 +55,6 @@ func runCommand() *cobra.Command { } runCmd.Flags().StringVar(&opts.WorkingDir, "workdir", "", "Work dir") 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().StringArrayVarP(&opts.Environment, "env", "e", []string{}, "Set environment variables") runCmd.Flags().BoolVar(&opts.Remove, "rm", false, "Automatically remove the container when it exits") diff --git a/local/compose/run.go b/local/compose/run.go index 08584ad91..189a0ecd0 100644 --- a/local/compose/run.go +++ b/local/compose/run.go @@ -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 { if detach { - // start container return s.apiClient.ContainerStart(ctx, container, apitypes.ContainerStartOptions{}) }