Bird
0
0

Which of the following commands correctly creates a Docker secret named db_password from a file password.txt?

easy📝 Syntax Q12 of 15
Docker - Security
Which of the following commands correctly creates a Docker secret named db_password from a file password.txt?
Adocker secret create db_password password.txt
Bdocker secret add db_password password.txt
Cdocker secret new db_password password.txt
Ddocker secret generate db_password password.txt
Step-by-Step Solution
Solution:
  1. Step 1: Recall Docker secret creation syntax

    The correct command to create a secret is docker secret create [name] [file].
  2. Step 2: Match the command with options

    docker secret create db_password password.txt matches the correct syntax exactly.
  3. Final Answer:

    docker secret create db_password password.txt -> Option A
  4. Quick Check:

    docker secret create = correct syntax [OK]
Quick Trick: Use 'docker secret create' to add secrets from files [OK]
Common Mistakes:
  • Using 'add' instead of 'create'
  • Using 'new' or 'generate' which are invalid
  • Confusing secret commands with service commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes