docker:tldr:f6a40
The docker secret inspect
command is used to retrieve and display detailed information about one or more secrets within Docker. Here is the breakdown of the command you provided: - docker secret inspect
: This is the base command used to inspect secrets. - --pretty
: This flag is used to format the output for better readability. It adds extra indentation and line breaks. - ${secret_name1 secret_name2 ---}
: This is referred to as the secret identifier. Multiple secrets can be specified here, separated by spaces. Each secret's name is provided without the secret
prefix. Example:
If you have two secrets named "database_password" and "api_token", the command could be written as follows: docker secret inspect --pretty database_password api_token
This command will display detailed information about these two secrets, including their ID, created date, and labels, in a more readable format due to the --pretty
flag.