mirror of https://github.com/docker/compose.git
Merge pull request #525 from docker/workingdir
workdir default value is defined by compose file
This commit is contained in:
commit
bff1fa1872
|
@ -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
|
||||
|
|
|
@ -34,7 +34,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
|
||||
|
|
|
@ -34,7 +34,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
|
||||
|
|
|
@ -38,7 +38,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
|
||||
|
|
|
@ -34,7 +34,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")
|
||||
|
|
|
@ -408,7 +408,7 @@ func TestCompose(t *testing.T) {
|
|||
const (
|
||||
composeFile = "../composefiles/aci-demo/aci_demo_port.yaml"
|
||||
composeFileMultiplePorts = "../composefiles/aci-demo/aci_demo_multi_port.yaml"
|
||||
composeProjectName = "acie2e"
|
||||
composeProjectName = "acidemo"
|
||||
serverContainer = composeProjectName + "_web"
|
||||
wordsContainer = composeProjectName + "_words"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue