浏览代码

Remove not implemented options

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 4 年之前
父节点
当前提交
7bed2343e6
共有 3 个文件被更改,包括 2 次插入26 次删除
  1. 2 16
      api/compose/api.go
  2. 0 9
      cli/cmd/compose/run.go
  3. 0 1
      local/compose/run.go

+ 2 - 16
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

+ 0 - 9
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")

+ 0 - 1
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{})
 	}