Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Unable to create a Docker secret from STDIN #697

Open
sleyzerzon opened this issue Oct 8, 2017 · 7 comments
Open

Unable to create a Docker secret from STDIN #697

sleyzerzon opened this issue Oct 8, 2017 · 7 comments

Comments

@sleyzerzon
Copy link

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                                     
@thaJeztah
Copy link
Member

I'm not able to reproduce this on Docker for Mac;

echo 'this is my secret' | docker secret create my-secret -
fi770k2qow3dr9fsold1cqlu6

I do notice you're running an old version of the Docker CLI; are you still able to reproduce this on an up-to-date version of the CLI?

@sleyzerzon
Copy link
Author

Well, I'm running a Docker Toolbox on Windows which, I believe, at the time I posted the question was the latest version. How do I update the client without reinstalling Docker Toolbox, is there a command? Which version are you running?

@thaJeztah
Copy link
Member

You'll probably have to update Toolbox to get a current version. The point here is that this sounds like an issue in the client, and the 17.07 client is outdated (17.09 was the current version at the time)

@williamjamir
Copy link

williamjamir commented Apr 10, 2018

@thaJeztah I'm using Docker version 17.10.0-ce, build f4ffd25 from Docker Toolbox on Windows and I'm having the same problem.

λ docker version
Client:
 Version:      17.10.0-ce
 API version:  1.33
 Go version:   go1.8.3
 Git commit:   f4ffd25
 Built:        Tue Oct 17 19:00:02 2017
 OS/Arch:      windows/amd64

Server:
 Version:      18.03.0-ce
 API version:  1.37 (minimum version 1.12)
 Go version:   go1.9.4
 Git commit:   0520e24
 Built:        Wed Mar 21 23:14:32 2018
 OS/Arch:      linux/amd64
 Experimental: false
λ echo "This is a secret" | docker secret create my_secret_data -
Error reading content from "-": Incorrect function.```

@thaJeztah
Copy link
Member

@williamjamir are you using ConEMU? If so, possibly related to Maximus5/ConEmu#958, Maximus5/ConEmu#1341, (see Maximus5/ConEmu#958 (comment))

@edrevo
Copy link

edrevo commented Aug 7, 2018

This seems to be fixed by moby/moby#37600

> echo 'this is my secret' | docker secret create my-secret -
Error reading content from "-": Función incorrecta.
~\git\cli [master ↓6 +0 ~1 -0 !]
> echo 'this is my secret' | .\build\docker-windows-amd64.exe secret create my-secret -
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.

@BretFisher
Copy link

@sleyzerzon can you update to latest toolbox and see if this is fixed for you?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants