Isn’t it a security risk to use /run/secrets/ ?
I think so!
But as example a database need it!
The location of the mount point within the container defaults to
/run/secrets/<secret_name>in Linux containers, or
C:\ProgramData\Docker\secretsin Windows containers. You can also specify a custom location.
How can i do this, specify a custom location?
And is it safe or can it be find out the location?
I think the location can be found because the secret can only be exists under the docker-path (where docker is running (docker root folder)).
There is a command (docker info) to find the docker root folder.
So it’s easy to find the secret path too.
Also i think it’s not secure to use it in compose like:
So how to use it secure?
For me it’s interesting in all three ways (dockerfile, docker compose and docker swarm).