mirror of https://github.com/docker/compose.git
Merge pull request #228 from docker/compose_project_name
Changed compose flag —name to —project-name, -p, aligned with docker-compose flag.
This commit is contained in:
commit
4232b66a6b
|
@ -45,7 +45,7 @@ func downCommand() *cobra.Command {
|
||||||
return runDown(cmd.Context(), opts)
|
return runDown(cmd.Context(), opts)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
downCmd.Flags().StringVar(&opts.Name, "name", "", "Project name")
|
downCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
|
||||||
downCmd.Flags().StringVar(&opts.WorkDir, "workdir", ".", "Work dir")
|
downCmd.Flags().StringVar(&opts.WorkDir, "workdir", ".", "Work dir")
|
||||||
downCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
downCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ func upCommand() *cobra.Command {
|
||||||
return runUp(cmd.Context(), opts)
|
return runUp(cmd.Context(), opts)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
upCmd.Flags().StringVar(&opts.Name, "name", "", "Project name")
|
upCmd.Flags().StringVarP(&opts.Name, "project-name", "p", "", "Project name")
|
||||||
upCmd.Flags().StringVar(&opts.WorkDir, "workdir", ".", "Work dir")
|
upCmd.Flags().StringVar(&opts.WorkDir, "workdir", ".", "Work dir")
|
||||||
upCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
upCmd.Flags().StringArrayVarP(&opts.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
|
||||||
upCmd.Flags().StringArrayVarP(&opts.Environment, "environment", "e", []string{}, "Environment variables")
|
upCmd.Flags().StringArrayVarP(&opts.Environment, "environment", "e", []string{}, "Environment variables")
|
||||||
|
|
|
@ -123,7 +123,7 @@ func (s *E2eACISuite) TestACIBackend() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("deploys a compose app", func() {
|
It("deploys a compose app", func() {
|
||||||
s.NewDockerCommand("compose", "up", "-f", "../composefiles/aci-demo/aci_demo_port.yaml", "--name", "acidemo").ExecOrDie()
|
s.NewDockerCommand("compose", "up", "-f", "../composefiles/aci-demo/aci_demo_port.yaml", "--project-name", "acidemo").ExecOrDie()
|
||||||
// Expect(output).To(ContainSubstring("Successfully deployed"))
|
// Expect(output).To(ContainSubstring("Successfully deployed"))
|
||||||
output := s.NewDockerCommand("ps").ExecOrDie()
|
output := s.NewDockerCommand("ps").ExecOrDie()
|
||||||
Lines := Lines(output)
|
Lines := Lines(output)
|
||||||
|
@ -155,7 +155,7 @@ func (s *E2eACISuite) TestACIBackend() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("shutdown compose app", func() {
|
It("shutdown compose app", func() {
|
||||||
s.NewDockerCommand("compose", "down", "-f", "../composefiles/aci-demo/aci_demo_port.yaml", "--name", "acidemo").ExecOrDie()
|
s.NewDockerCommand("compose", "down", "-f", "../composefiles/aci-demo/aci_demo_port.yaml", "--project-name", "acidemo").ExecOrDie()
|
||||||
})
|
})
|
||||||
It("switches back to default context", func() {
|
It("switches back to default context", func() {
|
||||||
output := s.NewCommand("docker", "context", "use", "default").ExecOrDie()
|
output := s.NewCommand("docker", "context", "use", "default").ExecOrDie()
|
||||||
|
|
Loading…
Reference in New Issue