I'm trying to create a Docker secret as per Docker docs:
$ echo | docker secret create my_secret -
and getting the following:
$ echo 'this is my secret' | docker secret create my-secret -
Error reading content from "-": Incorrect function.
This is running under Docker Toolbox in ConEmu:
$ docker version
Client:
Version: 17.07.0-ce
API version: 1.31
Go version: go1.8.3
Git commit: 8784753
Built: Tue Aug 29 17:41:05 2017
OS/Arch: windows/amd64
Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:45:38 2017
OS/Arch: linux/amd64
Experimental: false
The behavior manifests itself only for the STDIN option, the command works fine for a file:
$ docker secret create my_secret ./secret.txt
ulec3yck5jpwywg6o7ptxnun7
$ openssl rand -base64 32 | docker secret create secure-secret -
Error reading content from "-": Incorrect function.
$ echo "mydatabasepassword" | docker secret create db_pass -
Error reading content from "-": Incorrect function.