Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit f0cd91c

Browse files
committed
app_image is a required parameter
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
1 parent 072287b commit f0cd91c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

internal/commands/run.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ const (
3535

3636
const longDescription = `Run an application based on a docker app image.`
3737

38-
const example = `$ docker app run myrepo/myapp:mytag --name myinstallation --target-context=mycontext`
38+
const example = `$ docker app run --name myinstallation --target-context=mycontext myrepo/myapp:mytag`
3939

4040
func runCmd(dockerCli command.Cli) *cobra.Command {
4141
var opts runOptions
4242

4343
cmd := &cobra.Command{
44-
Use: "run [APP_NAME] [--name INSTALLATION_NAME] [--target-context TARGET_CONTEXT] [OPTIONS]",
44+
Use: "run [OPTIONS] [APP_IMAGE]",
4545
Aliases: []string{"deploy"},
4646
Short: "Run an application",
4747
Long: longDescription,
4848
Example: example,
49-
Args: cli.RequiresMaxArgs(1),
49+
Args: cli.ExactArgs(1),
5050
RunE: func(cmd *cobra.Command, args []string) error {
51-
return runRun(dockerCli, firstOrEmpty(args), opts)
51+
return runRun(dockerCli, args[0], opts)
5252
},
5353
}
5454
opts.parametersOptions.addFlags(cmd.Flags())

0 commit comments

Comments
 (0)