Added note for _FILE convention (#17798)

* Added note for _FILE convention

* Update compose/use-secrets.md

Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>

---------

Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
This commit is contained in:
Mohammed Affan 2023-07-24 12:58:36 +05:30 committed by GitHub
parent 26007544ff
commit d211fd5b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -74,9 +74,13 @@ volumes:
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 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.
> **Note**
>
> The `_FILE` environment variables demonstrated here are a convention used by some images, including Docker Official Images like [mysql](https://hub.docker.com/_/mysql) and [postgres](https://hub.docker.com/_/postgres).
## Resources:
- [Secrets top-level element](compose-file/09-secrets.md)