Cannot create secret with file
eSPiYa opened this issue · 1 comments
I'm running Docker with the latest version on Windows 10 for development purposes. I used to use external secrets with the older version of Docker, but it looks like I have to use secrets with files on swam mode which is the default settings of the latest version if I have to use docker-compose.
I tried using this command from the example:
docker secret create my_secret ./secret.json
But I receive this error message:
Error reading content from "./secret.json": open ./secret.json: The system cannot find the file specified.
So I created the file in the directory. However, I got a different error message:
Error response from daemon: rpc error: code = InvalidArgument desc = secret data must be larger than 0 and less than 512000 bytes
Tried to revise it like this:
echo "mysecret" | docker secret create my_secret ./secret.json
But still receive the same error message.
Hi eSPiYa,
Did you ever find a solution to this issue? I encountered the same error upon doing a docker stack deploy
and my certs ended up not being in the correct location. I would double check that.
Good luck!
-Shane