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,230 points
523 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,440 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 23, 2019 in Docker by Kalgi
• 52,360 points
1,828 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,230 points
2,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
847 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,700 points
603 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,090 points
2,467 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,440 points
435 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,440 points
395 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP