How to create a secret in docker

0 votes

Hi Guys,

I am trying to create a secret in docker. But I don't know how to create it. Can anyone help me how can I do that?

Aug 17, 2020 in Docker by akhtar
• 38,170 points
165 views

1 answer to this question.

0 votes

Hi@akhtar,

In Docker, a secret is any blob of data, such as a password, SSH private key, TLS Certificate, or any other piece of data that is sensitive in nature. When you add a secret to the swarm, Docker sends the secret over to the swarm manager over a mutually authenticated TLS connection, making use of the built-in Certificate Authority that gets automatically created when bootstrapping a new swarm. You can use the below command to create a secret.

$ echo "this is my secret" | docker secret create my_secret
answered Aug 17, 2020 by MD
• 95,160 points

Related Questions In Docker

0 votes
1 answer

How to create a container and run images in docker?

Look for what all images you have ...READ MORE

answered Feb 22, 2019 in Docker by Kalgi
• 52,310 points
561 views
0 votes
1 answer

How to create a user-defined Bridge network in docker?

To create a user-defined bridge network, one ...READ MORE

answered Jul 3, 2019 in Docker by Sirajul
• 59,050 points
1,408 views
0 votes
0 answers

How to invoke a Docker secret key in c# console application? I want a sample code for it.

Actually I want hide a salt key ...READ MORE

Mar 20, 2020 in Docker by anonymous
• 120 points
367 views
0 votes
1 answer

How to save a Dynamic port in Docker for Windows?

The mapped ports can be accessed via ...READ MORE

answered Sep 4, 2018 in Docker by Tyrion anex
• 8,660 points
198 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,120 points
1,142 views
0 votes
1 answer

How to create a Docker swarm in Linux system?

Hi@akhtar, You need to initialize one node with ...READ MORE

answered Dec 24, 2020 in Docker by MD
• 95,160 points
69 views
0 votes
1 answer

How to create a service in Docker swarm?

Hi@akhtar, To create a service in Docker swarm, ...READ MORE

answered Dec 24, 2020 in Docker by MD
• 95,160 points
48 views