What are "docker secrets" and why is it necessary?

0 votes
I recently came across this term called "docker secrets". What does this mean?
Jul 5 in Docker by Ruby
21 views

1 answer to this question.

0 votes

In terms of Docker Swarm services, a secret is a blob of data, such as a password, SSH private key, SSL certificate, or another piece of data that should not be transmitted over a network or stored unencrypted in a Dockerfile or in your application’s source code.

In Docker 1.13 and higher, you can use "Docker secretsto centrally manage this data and securely transmit it to only those containers that need access to it. Secrets are encrypted during transit and at rest in a Docker swarm. A given secret is only accessible to those services which have been granted explicit access to it, and only while those service tasks are running.

You can use secrets to manage any sensitive data which a container needs at runtime but you don’t want to store in the image or in source control, such as:

  • Usernames and passwords

  • TLS certificates and keys

  • SSH keys

  • Other important data such as the name of a database or internal server

  • Generic strings or binary content (up to 500 kb in size).

    Another use case for using secrets is to provide a layer of abstraction between the container and a set of credentials.You can also use secrets to manage non-sensitive data, such as configuration files.
     

answered Jul 5 by Sirajul
• 19,670 points

Related Questions In Docker

0 votes
1 answer

What is the difference between “expose” and “publish” in Docker?

Basically, you have three options: Neither specify EXPOSE nor -p -> ...READ MORE

answered Jul 18, 2018 in Docker by Nilesh
• 6,900 points
278 views
0 votes
1 answer

What is the difference between a Docker image and a container?

Here is very basic explanation for image ...READ MORE

answered Sep 4, 2018 in Docker by Damon Salvatore
• 5,510 points
546 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 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
• 56,520 points
136 views
0 votes
1 answer
0 votes
1 answer