diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 88f7528d52..cce26a0fa1 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -40,5 +40,4 @@ offer a paid security bounty program at this time. This project docs not provide long-term supported versions, and only the current release and `main` branch are actively maintained. Docker Compose v1, and the corresponding [v1 branch](https://github.com/docker/compose/tree/v1) reached -EOL and are no longer supported. - +EOL and are no longer supported. diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/markdown-lint.yaml new file mode 100644 index 0000000000..11565e4fad --- /dev/null +++ b/.github/workflows/markdown-lint.yaml @@ -0,0 +1,42 @@ +name: Markdown Lint Check + +on: + pull_request: + paths: + - "**/*.md" # Run only when Markdown files change + push: + branches: + - main + +permissions: + contents: read + pull-requests: write + +jobs: + markdown-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Node.js & Markdownlint + run: | + sudo apt-get update + sudo apt-get install -y nodejs npm + sudo npm install -g markdownlint-cli + + - name: Run Markdownlint + run: | + markdownlint "**/*.md" --config .markdownlint.json > markdown-lint-report.txt || true + + - name: Post Lint Report as PR Comment + if: github.event_name == 'pull_request' + uses: mshick/add-pr-comment@v2 + with: + message: | + **Markdown Lint Report:** + ``` + $(cat markdown-lint-report.txt) + ``` + repo-token: ${{ secrets.GITHUB_TOKEN }} + allow-repeats: false diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000000..2a09efaee6 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,70 @@ +{ + "code-block-style": { + "style": "fenced" + }, + "code-fence-style": { + "style": "backtick" + }, + "emphasis-style": { + "style": "asterisk" + }, + "extended-ascii": { + "ascii-only": false + }, + "fenced-code-language": { + "allowed_languages": [ + "bash", + "html", + "javascript", + "json", + "markdown", + "text", + "go" + ], + "language_only": true + }, + "heading-style": { + "style": "atx" + }, + "hr-style": { + "style": "---" + }, + "line-length": { + "strict": false, + "code_blocks": false + }, + "link-image-style": { + "collapsed": false, + "shortcut": false, + "url_inline": false + }, + "no-duplicate-heading": { + "siblings_only": true + }, + "ol-prefix": { + "style": "any" + }, + "proper-names": { + "code_blocks": false, + "names": [ + "Cake.Markdownlint", + "CommonMark", + "JavaScript", + "Markdown", + "markdown-it", + "markdownlint", + "Node.js", + "Docker", + "Go" + ] + }, + "reference-links-images": { + "shortcut_syntax": true + }, + "strong-style": { + "style": "asterisk" + }, + "ul-style": { + "style": "dash" + } +} diff --git a/BUILDING.md b/BUILDING.md index 8066be4f1d..501fd45782 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -36,6 +36,7 @@ make test If you need to update a golden file simply do `go test ./... -test.update-golden`. ### End-to-end tests + To run e2e tests, the Compose CLI binary needs to be built. All the commands to run e2e tests propose a version with the prefix `build-and-e2e` to first build the CLI before executing tests. @@ -50,6 +51,7 @@ make e2e ``` Or if you need to build the CLI, run: + ```console make build-and-e2e ``` @@ -63,6 +65,7 @@ make e2e-compose ``` Or if you need to build the CLI, run: + ```console make build-and-e2e-compose ``` @@ -84,6 +87,7 @@ make build-and-e2e-compose-standalone ## Releases To create a new release: + * Check that the CI is green on the main branch for the commit you want to release * Run the release GitHub Actions workflow with a tag of form vx.y.z following existing tags. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9b80b8abc4..79ba5671f4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,6 @@ We also like to send gifts—if you're into Docker swag, make sure to let us know. We currently do not offer a paid security bounty program but are not ruling it out in the future. - ## Reporting other issues A great way to contribute to the project is to send a detailed report when you @@ -55,18 +54,18 @@ resolve the issue, please leave a comment. When reporting issues, always include: -* The output of `docker version`. -* The output of `docker context show`. -* The output of `docker info`. +- The output of `docker version`. +- The output of `docker context show`. +- The output of `docker info`. Also, include the steps required to reproduce the problem if possible and applicable. This information will help us review and fix your issue faster. When sending lengthy log files, consider posting them as a gist -(https://gist.github.com). +(). Don't forget to remove sensitive data from your log files before posting (you can replace those parts with "REDACTED"). -_Note:_ +*Note:* Maintainers might request additional information to diagnose an issue, if initial reporter doesn't answer within a reasonable delay (a few weeks), issue will be closed. @@ -124,7 +123,6 @@ don't get discouraged! - ### Conventions Fork the repository and make changes on your fork in a feature branch: @@ -267,25 +265,25 @@ We want to keep the Docker community awesome, growing and collaborative. We need your help to keep it that way. To help with this we've come up with some general guidelines for the community as a whole: -* Be nice: Be courteous, respectful and polite to fellow community members: +- Be nice: Be courteous, respectful and polite to fellow community members: no regional, racial, gender or other abuse will be tolerated. We like nice people way better than mean ones! -* Encourage diversity and participation: Make everyone in our community feel +- Encourage diversity and participation: Make everyone in our community feel welcome, regardless of their background and the extent of their contributions, and do everything possible to encourage participation in our community. -* Keep it legal: Basically, don't get us in trouble. Share only content that +- Keep it legal: Basically, don't get us in trouble. Share only content that you own, do not share private or sensitive information, and don't break the law. -* Stay on topic: Make sure that you are posting to the correct channel and +- Stay on topic: Make sure that you are posting to the correct channel and avoid off-topic discussions. Remember when you update an issue or respond to an email you are potentially sending it to a large number of people. Please consider this before you update. Also, remember that nobody likes spam. -* Don't send emails to the maintainers: There's no need to send emails to the +- Don't send emails to the maintainers: There's no need to send emails to the maintainers to ask them to investigate an issue or to take a look at a pull request. Instead of sending an email, GitHub mentions should be used to ping maintainers to review a pull request, a proposal or an @@ -314,7 +312,7 @@ The rules: Go](https://go.dev/doc/effective_go) and [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments). 4. Include code comments. Tell us the why, the history and the context. -5. Document _all_ declarations and methods, even private ones. Declare +5. Document *all* declarations and methods, even private ones. Declare expectations, caveats and anything else that may be important. If a type gets exported, having the comments already there will ensure it's ready. 6. Variable name length should be proportional to its context and no longer. @@ -329,7 +327,7 @@ The rules: part of a util package. Just leave it unexported and well-documented. 9. All tests should run with `go test` and outside tooling should not be required. No, we don't need another unit testing framework. Assertion - packages are acceptable if they provide _real_ incremental value. + packages are acceptable if they provide *real* incremental value. 10. Even though we call these "rules" above, they are actually just guidelines. Since you've read all the rules, you now know that. diff --git a/README.md b/README.md index 3dfc0de109..9c5da3b15f 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # Table of Contents + - [Docker Compose v2](#docker-compose-v2) - [Where to get Docker Compose](#where-to-get-docker-compose) - + [Windows and macOS](#windows-and-macos) - + [Linux](#linux) + - [Windows and macOS](#windows-and-macos) + - [Linux](#linux) - [Quick Start](#quick-start) - [Contributing](#contributing) - [Legacy](#legacy) + # Docker Compose v2 [![GitHub release](https://img.shields.io/github/v/release/docker/compose.svg?style=flat-square)](https://github.com/docker/compose/releases/latest) @@ -40,16 +42,16 @@ Rename the relevant binary for your OS to `docker-compose` and copy it to `$HOME Or copy it into one of these folders to install it system-wide: -* `/usr/local/lib/docker/cli-plugins` OR `/usr/local/libexec/docker/cli-plugins` -* `/usr/lib/docker/cli-plugins` OR `/usr/libexec/docker/cli-plugins` +- `/usr/local/lib/docker/cli-plugins` OR `/usr/local/libexec/docker/cli-plugins` +- `/usr/lib/docker/cli-plugins` OR `/usr/libexec/docker/cli-plugins` (might require making the downloaded file executable with `chmod +x`) - Quick Start ----------- Using Docker Compose is a three-step process: + 1. Define your app's environment with a `Dockerfile` so it can be reproduced anywhere. 2. Define the services that make up your app in `compose.yaml` so diff --git a/docs/reference/compose.md b/docs/reference/compose.md index 33603cd89d..6703a3011c 100644 --- a/docs/reference/compose.md +++ b/docs/reference/compose.md @@ -61,15 +61,16 @@ Define and run multi-container applications with Docker | `--project-directory` | `string` | | Specify an alternate working directory
(default: the path of the, first specified, Compose file) | | `-p`, `--project-name` | `string` | | Project name | - ## Examples ### Use `-f` to specify the name and path of one or more Compose files + Use the `-f` flag to specify the location of a Compose [configuration file](/reference/compose-file/). #### Specifying multiple Compose files + You can supply multiple `-f` configuration files. When you supply multiple files, Compose combines them into a single configuration. Compose builds the configuration in the order you supply the files. Subsequent files override and add to their predecessors. @@ -91,6 +92,7 @@ services: volumes: - "/data" ``` + If the `docker-compose.admin.yml` also specifies this same service, any matching fields override the previous file. New values, add to the `webapp` service configuration. @@ -112,6 +114,7 @@ The `-f` flag is optional. If you don’t provide this flag on the command line, and its parent directories looking for a `compose.yaml` or `docker-compose.yaml` file. #### Specifying a path to a single Compose file + You can use the `-f` flag to specify a path to a Compose file that is not located in the current directory, either from the command line or by setting up a `COMPOSE_FILE` environment variable in your shell or in an environment file. @@ -127,6 +130,7 @@ $ docker compose -f ~/sandbox/rails/compose.yaml pull db Each configuration has a project name. Compose sets the project name using the following mechanisms, in order of precedence: + - The `-p` command line flag - The `COMPOSE_PROJECT_NAME` environment variable - The top level `name:` variable from the config file (or the last `name:` @@ -187,6 +191,7 @@ in attached mode. Alternatively, you can also run `docker compose up --menu=fals Use `--dry-run` flag to test a command without changing your application stack state. Dry Run mode shows you all the steps Compose applies when executing a command, for example: + ```console $ docker compose --dry-run up --build -d [+] Pulling 1/1 @@ -203,6 +208,7 @@ $ docker compose --dry-run up --build -d ✔ DRY-RUN MODE - Container nginx-golang-mysql-backend-1 Started 0.0s ✔ DRY-RUN MODE - Container nginx-golang-mysql-proxy-1 Started Started ``` + From the example above, you can see that the first step is to pull the image defined by `db` service, then build the `backend` service. Next, the containers are created. The `db` service is started, and the `backend` and `proxy` wait until the `db` service is healthy before starting. diff --git a/docs/reference/compose_alpha.md b/docs/reference/compose_alpha.md index 34485d7def..f867c6745f 100644 --- a/docs/reference/compose_alpha.md +++ b/docs/reference/compose_alpha.md @@ -10,13 +10,10 @@ Experimental commands | [`viz`](compose_alpha_viz.md) | EXPERIMENTAL - Generate a graphviz graph from your compose file | | [`watch`](compose_alpha_watch.md) | EXPERIMENTAL - Watch build context for service and rebuild/refresh containers when files are updated | - ### Options | Name | Type | Default | Description | |:------------|:-----|:--------|:--------------------------------| | `--dry-run` | | | Execute command in dry run mode | - - diff --git a/docs/reference/compose_alpha_dry-run.md b/docs/reference/compose_alpha_dry-run.md index 7c68d94d66..9ac16d9f36 100644 --- a/docs/reference/compose_alpha_dry-run.md +++ b/docs/reference/compose_alpha_dry-run.md @@ -3,6 +3,4 @@ Dry run command allows you to test a command without applying changes - - diff --git a/docs/reference/compose_alpha_generate.md b/docs/reference/compose_alpha_generate.md index f405462779..612dcc6d0c 100644 --- a/docs/reference/compose_alpha_generate.md +++ b/docs/reference/compose_alpha_generate.md @@ -12,6 +12,4 @@ EXPERIMENTAL - Generate a Compose file from existing containers | `--name` | `string` | | Project name to set in the Compose file | | `--project-dir` | `string` | | Directory to use for the project | - - diff --git a/docs/reference/compose_alpha_publish.md b/docs/reference/compose_alpha_publish.md index 7d36553523..7baa594cf6 100644 --- a/docs/reference/compose_alpha_publish.md +++ b/docs/reference/compose_alpha_publish.md @@ -13,6 +13,4 @@ Publish compose application | `--with-env` | `bool` | | Include environment variables in the published OCI artifact | | `-y`, `--y` | `bool` | | Assume "yes" as answer to all prompts | - - diff --git a/docs/reference/compose_alpha_scale.md b/docs/reference/compose_alpha_scale.md index f783f3335c..380802a2c9 100644 --- a/docs/reference/compose_alpha_scale.md +++ b/docs/reference/compose_alpha_scale.md @@ -10,6 +10,4 @@ Scale services | `--dry-run` | | | Execute command in dry run mode | | `--no-deps` | | | Don't start linked services | - - diff --git a/docs/reference/compose_alpha_viz.md b/docs/reference/compose_alpha_viz.md index 1a05aaac14..9b167c763f 100644 --- a/docs/reference/compose_alpha_viz.md +++ b/docs/reference/compose_alpha_viz.md @@ -14,6 +14,4 @@ EXPERIMENTAL - Generate a graphviz graph from your compose file | `--ports` | `bool` | | Include service's exposed ports in output graph | | `--spaces` | `bool` | | If given, space character ' ' will be used to indent,
otherwise tab character '\t' will be used | - - diff --git a/docs/reference/compose_alpha_watch.md b/docs/reference/compose_alpha_watch.md index aa8130e7a0..56e3871fa5 100644 --- a/docs/reference/compose_alpha_watch.md +++ b/docs/reference/compose_alpha_watch.md @@ -11,6 +11,4 @@ Watch build context for service and rebuild/refresh containers when files are up | `--no-up` | | | Do not build & start services before watching | | `--quiet` | | | hide build output | - - diff --git a/docs/reference/compose_attach.md b/docs/reference/compose_attach.md index 0b9ede1e01..a1601ce4ea 100644 --- a/docs/reference/compose_attach.md +++ b/docs/reference/compose_attach.md @@ -13,5 +13,4 @@ Attach local standard input, output, and error streams to a service's running co | `--no-stdin` | `bool` | | Do not attach STDIN | | `--sig-proxy` | `bool` | `true` | Proxy all received signals to the process | - diff --git a/docs/reference/compose_build.md b/docs/reference/compose_build.md index 53150cdd86..c2d9ec8840 100644 --- a/docs/reference/compose_build.md +++ b/docs/reference/compose_build.md @@ -26,7 +26,6 @@ run `docker compose build` to rebuild it. | `--ssh` | `string` | | Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent) | | `--with-dependencies` | `bool` | | Also build dependencies (transitively) | - ## Description diff --git a/docs/reference/compose_commit.md b/docs/reference/compose_commit.md index 1aad40931f..fc718b3e29 100644 --- a/docs/reference/compose_commit.md +++ b/docs/reference/compose_commit.md @@ -14,6 +14,4 @@ Create a new image from a service container's changes | `-m`, `--message` | `string` | | Commit message | | `-p`, `--pause` | `bool` | `true` | Pause container during commit | - - diff --git a/docs/reference/compose_config.md b/docs/reference/compose_config.md index 0eac3de637..94cdfe5f4d 100644 --- a/docs/reference/compose_config.md +++ b/docs/reference/compose_config.md @@ -30,7 +30,6 @@ the canonical format. | `--variables` | `bool` | | Print model variables and default values. | | `--volumes` | `bool` | | Print the volume names, one per line. | - ## Description diff --git a/docs/reference/compose_cp.md b/docs/reference/compose_cp.md index 0886bbd9f9..e004f6f5e4 100644 --- a/docs/reference/compose_cp.md +++ b/docs/reference/compose_cp.md @@ -13,6 +13,4 @@ Copy files/folders between a service container and the local filesystem | `-L`, `--follow-link` | `bool` | | Always follow symbol link in SRC_PATH | | `--index` | `int` | `0` | Index of the container if service has multiple replicas | - - diff --git a/docs/reference/compose_create.md b/docs/reference/compose_create.md index b87cce8572..b8f841cf24 100644 --- a/docs/reference/compose_create.md +++ b/docs/reference/compose_create.md @@ -18,6 +18,4 @@ Creates containers for a service | `--scale` | `stringArray` | | Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present. | | `-y`, `--y` | `bool` | | Assume "yes" as answer to all prompts and run non-interactively | - - diff --git a/docs/reference/compose_down.md b/docs/reference/compose_down.md index 2ac0bf2da4..b0008f5561 100644 --- a/docs/reference/compose_down.md +++ b/docs/reference/compose_down.md @@ -25,7 +25,6 @@ named volumes. | `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds | | `-v`, `--volumes` | `bool` | | Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers | - ## Description diff --git a/docs/reference/compose_events.md b/docs/reference/compose_events.md index b71f4c993d..be13f8edeb 100644 --- a/docs/reference/compose_events.md +++ b/docs/reference/compose_events.md @@ -28,7 +28,6 @@ The events that can be received using this can be seen [here](/reference/cli/doc | `--dry-run` | `bool` | | Execute command in dry run mode | | `--json` | `bool` | | Output events as a stream of json objects | - ## Description diff --git a/docs/reference/compose_exec.md b/docs/reference/compose_exec.md index 8b54def472..7dcf1a1197 100644 --- a/docs/reference/compose_exec.md +++ b/docs/reference/compose_exec.md @@ -19,7 +19,6 @@ you can use a command such as `docker compose exec web sh` to get an interactive | `-u`, `--user` | `string` | | Run the command as this user | | `-w`, `--workdir` | `string` | | Path to workdir directory for this command | - ## Description diff --git a/docs/reference/compose_images.md b/docs/reference/compose_images.md index 1e4e0259b1..0ff9de213e 100644 --- a/docs/reference/compose_images.md +++ b/docs/reference/compose_images.md @@ -11,6 +11,4 @@ List images used by the created containers | `--format` | `string` | `table` | Format the output. Values: [table \| json] | | `-q`, `--quiet` | `bool` | | Only display IDs | - - diff --git a/docs/reference/compose_kill.md b/docs/reference/compose_kill.md index 0b6c1d05f0..b7602d9850 100644 --- a/docs/reference/compose_kill.md +++ b/docs/reference/compose_kill.md @@ -15,7 +15,6 @@ $ docker compose kill -s SIGINT | `--remove-orphans` | `bool` | | Remove containers for services not defined in the Compose file | | `-s`, `--signal` | `string` | `SIGKILL` | SIGNAL to send to the container | - ## Description diff --git a/docs/reference/compose_logs.md b/docs/reference/compose_logs.md index 4c8ba7e348..a89b3aa15c 100644 --- a/docs/reference/compose_logs.md +++ b/docs/reference/compose_logs.md @@ -17,7 +17,6 @@ Displays log output from services | `-t`, `--timestamps` | `bool` | | Show timestamps | | `--until` | `string` | | Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) | - ## Description diff --git a/docs/reference/compose_ls.md b/docs/reference/compose_ls.md index 7719d20860..53a44eb8db 100644 --- a/docs/reference/compose_ls.md +++ b/docs/reference/compose_ls.md @@ -13,7 +13,6 @@ Lists running Compose projects | `--format` | `string` | `table` | Format the output. Values: [table \| json] | | `-q`, `--quiet` | `bool` | | Only display project names | - ## Description diff --git a/docs/reference/compose_pause.md b/docs/reference/compose_pause.md index 4a0d5bdcc0..9c870ac9fa 100644 --- a/docs/reference/compose_pause.md +++ b/docs/reference/compose_pause.md @@ -9,9 +9,8 @@ Pauses running containers of a service. They can be unpaused with `docker compos |:------------|:-------|:--------|:--------------------------------| | `--dry-run` | `bool` | | Execute command in dry run mode | - ## Description -Pauses running containers of a service. They can be unpaused with `docker compose unpause`. \ No newline at end of file +Pauses running containers of a service. They can be unpaused with `docker compose unpause`. diff --git a/docs/reference/compose_port.md b/docs/reference/compose_port.md index bbbfbf1561..53535e96e3 100644 --- a/docs/reference/compose_port.md +++ b/docs/reference/compose_port.md @@ -11,7 +11,6 @@ Prints the public port for a port binding | `--index` | `int` | `0` | Index of the container if service has multiple replicas | | `--protocol` | `string` | `tcp` | tcp or udp | - ## Description diff --git a/docs/reference/compose_ps.md b/docs/reference/compose_ps.md index 3572c53055..1eb37faa5d 100644 --- a/docs/reference/compose_ps.md +++ b/docs/reference/compose_ps.md @@ -25,14 +25,13 @@ example-bar-1 alpine "/entrypoint.…" bar 4 seconds ago exited | `-a`, `--all` | `bool` | | Show all stopped containers (including those created by the run command) | | `--dry-run` | `bool` | | Execute command in dry run mode | | [`--filter`](#filter) | `string` | | Filter services by a property (supported filters: status) | -| [`--format`](#format) | `string` | `table` | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | +| [`--format`](#format) | `string` | `table` | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to for more information about formatting output with templates | | `--no-trunc` | `bool` | | Don't truncate output | | `--orphans` | `bool` | `true` | Include orphaned services (not declared by project) | | `-q`, `--quiet` | `bool` | | Only display IDs | | `--services` | `bool` | | Display services | | [`--status`](#status) | `stringArray` | | Filter services by status. Values: [paused \| restarting \| removing \| running \| dead \| created \| exited] | - ## Description diff --git a/docs/reference/compose_pull.md b/docs/reference/compose_pull.md index 6a47f9d509..c2f798a2e4 100644 --- a/docs/reference/compose_pull.md +++ b/docs/reference/compose_pull.md @@ -14,14 +14,12 @@ Pulls an image associated with a service defined in a `compose.yaml` file, but d | `--policy` | `string` | | Apply pull policy ("missing"\|"always") | | `-q`, `--quiet` | `bool` | | Pull without printing progress information | - ## Description Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on those images - ## Examples Consider the following `compose.yaml`: diff --git a/docs/reference/compose_push.md b/docs/reference/compose_push.md index 0efc48c46d..849b142f1e 100644 --- a/docs/reference/compose_push.md +++ b/docs/reference/compose_push.md @@ -4,6 +4,7 @@ Pushes images for services to their respective registry/repository. The following assumptions are made: + - You are pushing an image you have built locally - You have access to the build key @@ -29,7 +30,6 @@ services: | `--include-deps` | `bool` | | Also push images of services declared as dependencies | | `-q`, `--quiet` | `bool` | | Push without printing progress information | - ## Description @@ -37,6 +37,7 @@ services: Pushes images for services to their respective registry/repository. The following assumptions are made: + - You are pushing an image you have built locally - You have access to the build key diff --git a/docs/reference/compose_restart.md b/docs/reference/compose_restart.md index e57f346a81..9ca055ad95 100644 --- a/docs/reference/compose_restart.md +++ b/docs/reference/compose_restart.md @@ -20,7 +20,6 @@ or [restart_policy](https://github.com/compose-spec/compose-spec/blob/main/deplo | `--no-deps` | `bool` | | Don't restart dependent services | | `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds | - ## Description diff --git a/docs/reference/compose_rm.md b/docs/reference/compose_rm.md index 5e84930bac..0b6001fa53 100644 --- a/docs/reference/compose_rm.md +++ b/docs/reference/compose_rm.md @@ -26,7 +26,6 @@ Removing djangoquickstart_web_run_1 ... done | `-s`, `--stop` | `bool` | | Stop the containers, if required, before removing | | `-v`, `--volumes` | `bool` | | Remove any anonymous volumes attached to containers | - ## Description diff --git a/docs/reference/compose_scale.md b/docs/reference/compose_scale.md index 3d0dbdb04a..9f3844b407 100644 --- a/docs/reference/compose_scale.md +++ b/docs/reference/compose_scale.md @@ -1,7 +1,7 @@ # docker compose scale -Scale services +Scale services ### Options @@ -10,6 +10,4 @@ Scale services | `--dry-run` | `bool` | | Execute command in dry run mode | | `--no-deps` | `bool` | | Don't start linked services | - - diff --git a/docs/reference/compose_start.md b/docs/reference/compose_start.md index 08db7ef213..09fe9cdf77 100644 --- a/docs/reference/compose_start.md +++ b/docs/reference/compose_start.md @@ -9,7 +9,6 @@ Starts existing containers for a service |:------------|:-------|:--------|:--------------------------------| | `--dry-run` | `bool` | | Execute command in dry run mode | - ## Description diff --git a/docs/reference/compose_stats.md b/docs/reference/compose_stats.md index 78d44b8935..1a3df5f6fc 100644 --- a/docs/reference/compose_stats.md +++ b/docs/reference/compose_stats.md @@ -9,10 +9,8 @@ Display a live stream of container(s) resource usage statistics |:--------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `-a`, `--all` | `bool` | | Show all containers (default shows just running) | | `--dry-run` | `bool` | | Execute command in dry run mode | -| `--format` | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/engine/cli/formatting/ for more information about formatting output with templates | +| `--format` | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to for more information about formatting output with templates | | `--no-stream` | `bool` | | Disable streaming stats and only pull the first result | | `--no-trunc` | `bool` | | Do not truncate output | - - diff --git a/docs/reference/compose_stop.md b/docs/reference/compose_stop.md index fe84f24f8f..3471ee836d 100644 --- a/docs/reference/compose_stop.md +++ b/docs/reference/compose_stop.md @@ -10,7 +10,6 @@ Stops running containers without removing them. They can be started again with ` | `--dry-run` | `bool` | | Execute command in dry run mode | | `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds | - ## Description diff --git a/docs/reference/compose_top.md b/docs/reference/compose_top.md index eeacb3866a..814af58dfe 100644 --- a/docs/reference/compose_top.md +++ b/docs/reference/compose_top.md @@ -9,7 +9,6 @@ Displays the running processes |:------------|:-------|:--------|:--------------------------------| | `--dry-run` | `bool` | | Execute command in dry run mode | - ## Description diff --git a/docs/reference/compose_unpause.md b/docs/reference/compose_unpause.md index 92841ceade..cd50737150 100644 --- a/docs/reference/compose_unpause.md +++ b/docs/reference/compose_unpause.md @@ -9,7 +9,6 @@ Unpauses paused containers of a service |:------------|:-------|:--------|:--------------------------------| | `--dry-run` | `bool` | | Execute command in dry run mode | - ## Description diff --git a/docs/reference/compose_up.md b/docs/reference/compose_up.md index d1478cdd33..6b9b594916 100644 --- a/docs/reference/compose_up.md +++ b/docs/reference/compose_up.md @@ -55,7 +55,6 @@ If the process is interrupted using `SIGINT` (ctrl + C) or `SIGTERM`, the contai | `-w`, `--watch` | `bool` | | Watch source code and rebuild/refresh containers when files are updated. | | `-y`, `--y` | `bool` | | Assume "yes" as answer to all prompts and run non-interactively | - ## Description @@ -65,8 +64,8 @@ Builds, (re)creates, starts, and attaches to containers for a service. Unless they are already running, this command also starts any linked services. The `docker compose up` command aggregates the output of each container (like `docker compose logs --follow` does). -One can optionally select a subset of services to attach to using `--attach` flag, or exclude some services using -`--no-attach` to prevent output to be flooded by some verbose services. +One can optionally select a subset of services to attach to using `--attach` flag, or exclude some services using +`--no-attach` to prevent output to be flooded by some verbose services. When the command exits, all containers are stopped. Running `docker compose up --detach` starts the containers in the background and leaves them running. diff --git a/docs/reference/compose_version.md b/docs/reference/compose_version.md index 3a6329dadb..268a529730 100644 --- a/docs/reference/compose_version.md +++ b/docs/reference/compose_version.md @@ -11,5 +11,4 @@ Show the Docker Compose version information | `-f`, `--format` | `string` | | Format the output. Values: [pretty \| json]. (Default: pretty) | | `--short` | `bool` | | Shows only Compose's version number | - diff --git a/docs/reference/compose_wait.md b/docs/reference/compose_wait.md index 59474c9b50..41bae066c8 100644 --- a/docs/reference/compose_wait.md +++ b/docs/reference/compose_wait.md @@ -10,6 +10,4 @@ Block until containers of all (or specified) services stop. | `--down-project` | `bool` | | Drops project when the first container stops | | `--dry-run` | `bool` | | Execute command in dry run mode | - - diff --git a/docs/reference/compose_watch.md b/docs/reference/compose_watch.md index e2b4aef1a2..c93ddb4392 100644 --- a/docs/reference/compose_watch.md +++ b/docs/reference/compose_watch.md @@ -12,6 +12,4 @@ Watch build context for service and rebuild/refresh containers when files are up | `--prune` | `bool` | | Prune dangling images on rebuild | | `--quiet` | `bool` | | hide build output | - -