From d211fd5b69e8713e7a4f5caa2a6a425a369844ca Mon Sep 17 00:00:00 2001 From: Mohammed Affan <72978371+Affan-7@users.noreply.github.com> Date: Mon, 24 Jul 2023 12:58:36 +0530 Subject: [PATCH] Added note for _FILE convention (#17798) * Added note for _FILE convention * Update compose/use-secrets.md Co-authored-by: Bjorn Neergaard --------- Co-authored-by: Bjorn Neergaard --- compose/use-secrets.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compose/use-secrets.md b/compose/use-secrets.md index 0e3572ab43..86225ca423 100644 --- a/compose/use-secrets.md +++ b/compose/use-secrets.md @@ -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/` 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)