What is required to use secrets in a Compose file?

  1. Define secrets in the file and mark external: true
  2. Set secret=true in environment
  3. Define them as environment variables
  4. Create secret in the container first
Correct answer Define secrets in the file and mark external: true

Explanation

Secrets must be defined in the Compose file and marked as external if created outside.

Update: Admin added a tag on this question

Topics

By Admin · · 34 views