Add documentation for --menu up option and COMPOSE_MENU environemnt variable

Co-authored-by: Milas Bowman <devnull@milas.dev>
Signed-off-by: Joana H <joana.hrotko@gmail.com>
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
This commit is contained in:
Joana Hrotko 2024-05-07 13:42:08 +01:00 committed by Nicolas De loof
parent 591d9eb3a2
commit b81624185f
5 changed files with 39 additions and 33 deletions

View File

@ -164,8 +164,7 @@ func upCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service, ex
flags.BoolVar(&up.wait, "wait", false, "Wait for services to be running|healthy. Implies detached mode.") flags.BoolVar(&up.wait, "wait", false, "Wait for services to be running|healthy. Implies detached mode.")
flags.IntVar(&up.waitTimeout, "wait-timeout", 0, "Maximum duration to wait for the project to be running|healthy") flags.IntVar(&up.waitTimeout, "wait-timeout", 0, "Maximum duration to wait for the project to be running|healthy")
flags.BoolVarP(&up.watch, "watch", "w", false, "Watch source code and rebuild/refresh containers when files are updated.") flags.BoolVarP(&up.watch, "watch", "w", false, "Watch source code and rebuild/refresh containers when files are updated.")
flags.BoolVar(&up.navigationMenu, "menu", false, "Enable interactive shortcuts when running attached (Experimental). Incompatible with --detach.") flags.BoolVar(&up.navigationMenu, "menu", false, "Enable interactive shortcuts when running attached. Incompatible with --detach. Can also be enable/disable by setting COMPOSE_MENU environment var.")
flags.MarkHidden("menu") //nolint:errcheck
return upCmd return upCmd
} }

View File

@ -177,6 +177,9 @@ If flags are explicitly set on the command line, the associated environment vari
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned
containers for the project. containers for the project.
Setting the `COMPOSE_MENU` environment variable to `false` disables the helper menu when running `docker compose up`
in attached mode. Alternatively, you can also run `docker compose up --menu=false` to disable the helper menu.
### Use Dry Run mode to test your command ### Use Dry Run mode to test your command
Use `--dry-run` flag to test a command without changing your application stack state. Use `--dry-run` flag to test a command without changing your application stack state.

View File

@ -6,7 +6,7 @@ Create and start containers
### Options ### Options
| Name | Type | Default | Description | | Name | Type | Default | Description |
|:-------------------------------|:--------------|:---------|:--------------------------------------------------------------------------------------------------------| |:-------------------------------|:--------------|:---------|:----------------------------------------------------------------------------------------------------------------------------------------------------|
| `--abort-on-container-exit` | | | Stops all containers if any container was stopped. Incompatible with -d | | `--abort-on-container-exit` | | | Stops all containers if any container was stopped. Incompatible with -d |
| `--abort-on-container-failure` | | | Stops all containers if any container exited with failure. Incompatible with -d | | `--abort-on-container-failure` | | | Stops all containers if any container exited with failure. Incompatible with -d |
| `--always-recreate-deps` | | | Recreate dependent containers. Incompatible with --no-recreate. | | `--always-recreate-deps` | | | Recreate dependent containers. Incompatible with --no-recreate. |
@ -17,6 +17,7 @@ Create and start containers
| `--dry-run` | | | Execute command in dry run mode | | `--dry-run` | | | Execute command in dry run mode |
| `--exit-code-from` | `string` | | Return the exit code of the selected service container. Implies --abort-on-container-exit | | `--exit-code-from` | `string` | | Return the exit code of the selected service container. Implies --abort-on-container-exit |
| `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed | | `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed |
| `--menu` | | | Enable interactive shortcuts when running attached. Incompatible with --detach. Can also be enable/disable by setting COMPOSE_MENU environment var. |
| `--no-attach` | `stringArray` | | Do not attach (stream logs) to the specified services | | `--no-attach` | `stringArray` | | Do not attach (stream logs) to the specified services |
| `--no-build` | | | Don't build an image, even if it's policy | | `--no-build` | | | Don't build an image, even if it's policy |
| `--no-color` | | | Produce monochrome output | | `--no-color` | | | Produce monochrome output |

View File

@ -118,6 +118,9 @@ long: |-
Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned
containers for the project. containers for the project.
Setting the `COMPOSE_MENU` environment variable to `false` disables the helper menu when running `docker compose up`
in attached mode. Alternatively, you can also run `docker compose up --menu=false` to disable the helper menu.
### Use Dry Run mode to test your command ### Use Dry Run mode to test your command
Use `--dry-run` flag to test a command without changing your application stack state. Use `--dry-run` flag to test a command without changing your application stack state.

View File

@ -123,9 +123,9 @@ options:
value_type: bool value_type: bool
default_value: "false" default_value: "false"
description: | description: |
Enable interactive shortcuts when running attached (Experimental). Incompatible with --detach. Enable interactive shortcuts when running attached. Incompatible with --detach. Can also be enable/disable by setting COMPOSE_MENU environment var.
deprecated: false deprecated: false
hidden: true hidden: false
experimental: false experimental: false
experimentalcli: false experimentalcli: false
kubernetes: false kubernetes: false