FreeKB - Docker docker secret ls command (list secrets)
Docker - docker secret ls command (list secrets)

A secret is a file that contains sensitive data, such as a password.

This assumes you have installed Docker on Linux and Docker is running. The docker secret ls command will list the secrets that have been created.

docker secret ls

 

Which will return something like this.

ID                          NAME               DRIVER        CREATED             UPDATED
pp6d206pqk28cj12kjv36l2v7   my_secret                        14 months ago       14 months ago
g6ab3l6qr9w5lt8puu3f971f5   foobar                           7 months ago        7 months ago
oxp56zzcssvptzdk214qv22l5   another_example                  5 months ago        5 months ago

 

If you know the ID of the secret, the -f or --filter option can be used to list the secret, like this.

docker secret ls --filter "id=pp6d206pqk28cj12kjv36l2v7"
. . .
ID                          NAME               DRIVER        CREATED             UPDATED
pp6d206pqk28cj12kjv36l2v7   my_secret                        14 months ago       14 months ago

 

If you know the name of the secret, the -f or --filter option can be used to list the secret, like this.

docker secret ls --filter "name=my_secret"
. . .
ID                          NAME               DRIVER        CREATED             UPDATED
pp6d206pqk28cj12kjv36l2v7   my_secret                        14 months ago       14 months ago


Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 22d5a in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |