Remove not implemented options

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2020-12-14 17:38:19 +01:00
parent b289138ca9
commit 7bed2343e6
3 changed files with 2 additions and 26 deletions

View File

@ -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

View File

@ -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")

View File

@ -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{})
}