Docs contained an invalid example:
```
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.*.restart contains an invalid type, it should be a string
```
Use quotes to avoid YAML's implicit type conversion. Someone may also want to do an audit of [other type conversions that might cause problems](https://www.rpatterson.net/blog/docker-gotchas/#yaml-needs-some-zen).
- Add missing code-hints (console, yaml)
- Consistently add an empty line after code-blocks
- Combine some examples where the output and the command were
put in separate blocks. With the "console" code-hint, this
is no longer nescessary.
- fix indentation in cloud/ecs-integration.md, which caused the
numbered-list to be interrupted.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* document compose.v2 linux installation as a CLI plugin
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
* Minor style update
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
I looked forever to find this information. The expected section to find this information is this page, not where it ends up at the bottom of overview.
Based on the v3 overview of compose-files, it seems it can be included with this line- as thats how they did it there.
A link would also work, or a copy of the whole section. Using include has the added benefit however of making a single section with changes updated across the docs if needed.
* compose: make `project directory` explicit
See https://github.com/docker/compose/issues/8347 .
Some users assume that `project directory` is the directory which has `docker-compose.yaml`.
But this is not true (at least for now) when you execute `docker-compose` in sub directory.
This PR makes it clear.
* fix a typo and made style updates
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
* Add --service-ports note to ports section
## Description
Add note in `ports` section of file reference docs pointing to the `run` command's `--service-ports` flag
## Motivation
Spent quite a few hours spinning my wheels before I came across `run`'s `--service-ports` flag.
I'm struggling to find the issue where I found this, but the comment pointing to `--service-ports` had a lot of reacts, so this might be a relatively common
## Things I'd still like to do
- [ ] link to the [`--service-ports` docs](https://github.com/docker/docker.github.io/blob/master/compose/reference/run.md) -- not sure how to do this
- [ ] clean up location of this note -- not sure if I've put the note in a good place -- we can shunt it to the bottom
- [ ] Duplicate for older versions
Thanks
* Minor style update
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
BuildKit allows using alternative Dockerfile syntaxes to introduce new features
without having to update Docker itself. The general recommendation is to always
specify a "syntax" directive in a Dockerfile, so that (if needed) older versions
of Docker can download the correct syntax to build the Dockerfile.
This updates our examples to include a syntax directive, to make users more familiar
with these directives, and to illustrate best-pracitces in our documentation.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
First step: remove the old "index" page, as it was not linked from the TOC, and
was serving the same purpose as the "overview" page.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Unifying all "examples" in this directory; some of these should still be
reviewed and/or removed in favor of examples from "awesome compose"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The current wording of "name of the config as it exists in Docker" suggests that the real generated name is used, instead the "key" of `configs` object in the docker-compose file is used.
```yml
version: "3.5"
services:
app:
image: alpine
configs:
# documentation currently suggests this (the "name as in Docker")
# this causes an error- undefined config "name-as-in-docker"
- source: name-as-in-docker
target: /config-with-name-as-in-docker.json
# the correct source to use is the name (key) from this docker-compose file
- source: name-as-in-file
target: /config-with-name-as-in-file.json
configs:
name-as-in-file:
name: name-as-in-docker
file: ./cfg.json
```