This is my first post so be nice.
I deploy a docker-compose in swarm mode, I share a CIFS volume and I can access it.
To access it I need to display my credentials in my docker compose file.
I’ve seen that it’s possible to use a secret, which could allow me not to leave my password in clear text, but I don’t know how to do it.
Can you help me?
The volume part of my docker compose file :
I’ve already searched quite a bit on the internet and in the docker documentation but without success unfortunately.
Thanks to those who will take the time to help me.
docker volumes does not support the
credentials option. When using cifs, there is no way around storing the credentials plain text when creating the volume. Even if the volume is created on the cli, a simple
docker volume inspect will show the credentials. That’s why I use nfsv4 instead.
Thank you very much meyay for your quick reply, I searched a lot without finding an answer to my problem, but now I understand.
Do you have an example with NSFv4 ?
You already found an example by using the forum search, that’s why I didn’t paste an identical looking example here.
The discussion is continued in (including a valid example for nfsv4 mounts):
I’m asking the Docker community for help because I’m facing a problem.
I execute a docker-compose which launches a docker swarm stack, I want to mount an NFS volume but I get an error message.
Error message >> “failed to mount local volume:…”
Can you help me ?
Is my configuration correct ?
I can map the network share and write to it from ubuntu.