ENGDOCS-2944 (#23311)

<!--Delete sections as needed -->

## Description

Fixes https://github.com/docker/docs/issues/23160
Fixes https://github.com/docker/docs/issues/23051

## Related issues or tickets

<!-- Related issues, pull requests, or Jira tickets -->

## Reviews

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Technical review
- [ ] Editorial review
- [ ] Product review
This commit is contained in:
Allie Sadler
2025-08-26 16:06:49 +01:00
committed by GitHub
parent 0d624c8a71
commit 49771bafee
2 changed files with 4 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ In the advanced example above:
- The `secrets` attribute under each service defines the secrets you want to inject into the specific container.
- The top-level `secrets` section defines the variables `db_password` and `db_root_password` and provides the `file` that populates their values.
- The deployment of each container means Docker creates a temporary filesystem mount under `/run/secrets/<secret_name>` with their specific values.
- The deployment of each container means Docker creates a bind mount under `/run/secrets/<secret_name>` with their specific values.
> [!NOTE]
>

View File

@@ -49,8 +49,8 @@ services:
When used to build service images from source, the Compose file creates three Docker images:
* `example/webapp`: A Docker image is built using `webapp` sub-directory, within the Compose file's parent folder, as the Docker build context. Lack of a `Dockerfile` within this folder returns an error.
* `example/database`: A Docker image is built using `backend` sub-directory within the Compose file parent folder. `backend.Dockerfile` file is used to define build steps, this file is searched relative to the context path, which means `..` resolves to the Compose file's parent folder, so `backend.Dockerfile` is a sibling file.
* `example/webapp`: A Docker image is built using `webapp` sub-directory, within the Compose file's folder, as the Docker build context. Lack of a `Dockerfile` within this folder returns an error.
* `example/database`: A Docker image is built using `backend` sub-directory within the Compose file's folder. `backend.Dockerfile` file is used to define build steps, this file is searched relative to the context path, which means `..` resolves to the Compose file's folder, so `backend.Dockerfile` is a sibling file.
* A Docker image is built using the `custom` directory with the user's `$HOME` as the Docker context. Compose displays a warning about the non-portable path used to build image.
On push, both `example/webapp` and `example/database` Docker images are pushed to the default registry. The `custom` service image is skipped as no `image` attribute is set and Compose displays a warning about this missing attribute.
@@ -61,7 +61,7 @@ The `build` subsection defines configuration options that are applied by Compose
`build` can be specified either as a string containing a path to the build context or as a detailed structure:
Using the string syntax, only the build context can be configured as either:
- A relative path to the Compose file's parent folder. This path must be a directory and must contain a `Dockerfile`
- A relative path to the Compose file's folder. This path must be a directory and must contain a `Dockerfile`
```yml
services: