mirror of https://github.com/docker/compose.git
workdir default value is defined by compose file
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
789f556876
commit
838937c907
|
@ -21,8 +21,9 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/compose-spec/compose-go/cli"
|
||||
"github.com/docker/api/client"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/docker/api/client"
|
||||
)
|
||||
|
||||
func convertCommand() *cobra.Command {
|
||||
|
@ -39,7 +40,7 @@ func convertCommand() *cobra.Command {
|
|||
},
|
||||
}
|
||||
convertCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
|
||||
convertCmd.Flags().StringVar(&opts.WorkingDir, "workdir", ".", "Work dir")
|
||||
convertCmd.Flags().StringVar(&opts.WorkingDir, "workdir", "", "Work dir")
|
||||
convertCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
||||
|
||||
return convertCmd
|
||||
|
|
|
@ -35,7 +35,7 @@ func downCommand() *cobra.Command {
|
|||
},
|
||||
}
|
||||
downCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
|
||||
downCmd.Flags().StringVar(&opts.WorkingDir, "workdir", ".", "Work dir")
|
||||
downCmd.Flags().StringVar(&opts.WorkingDir, "workdir", "", "Work dir")
|
||||
downCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
||||
|
||||
return downCmd
|
||||
|
|
|
@ -35,7 +35,7 @@ func logsCommand() *cobra.Command {
|
|||
},
|
||||
}
|
||||
logsCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
|
||||
logsCmd.Flags().StringVar(&opts.WorkingDir, "workdir", ".", "Work dir")
|
||||
logsCmd.Flags().StringVar(&opts.WorkingDir, "workdir", "", "Work dir")
|
||||
logsCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
||||
|
||||
return logsCmd
|
||||
|
|
|
@ -39,7 +39,7 @@ func psCommand() *cobra.Command {
|
|||
},
|
||||
}
|
||||
psCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
|
||||
psCmd.Flags().StringVar(&opts.WorkingDir, "workdir", ".", "Work dir")
|
||||
psCmd.Flags().StringVar(&opts.WorkingDir, "workdir", "", "Work dir")
|
||||
psCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
||||
|
||||
return psCmd
|
||||
|
|
|
@ -35,7 +35,7 @@ func upCommand() *cobra.Command {
|
|||
},
|
||||
}
|
||||
upCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
|
||||
upCmd.Flags().StringVar(&opts.WorkingDir, "workdir", ".", "Work dir")
|
||||
upCmd.Flags().StringVar(&opts.WorkingDir, "workdir", "", "Work dir")
|
||||
upCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
||||
upCmd.Flags().StringArrayVarP(&opts.Environment, "environment", "e", []string{}, "Environment variables")
|
||||
upCmd.Flags().BoolP("detach", "d", true, " Detached mode: Run containers in the background")
|
||||
|
|
Loading…
Reference in New Issue