Skip to content

What's the benefit to use docker secret instead of mounted file #3711

Answered by amir20
Adamou02 asked this question in Q&A
Discussion options

You must be logged in to vote

There is a significant difference. When using mount, the file must exist on the host. This approach works well if you plan to deploy only one or two hosts.

However, in swarm mode, many nodes need to be managed. Copying a file to a single node is not an ideal solution. With secrets, the file is copied locally and stored in secrets, making it accessible to all nodes. This simplifies the process of updating or managing configurations for services.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Adamou02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants