无法从STDIN创建Docker机密

时间:2017-10-08 17:18:54

标签: docker conemu docker-secrets

我正在尝试根据Docker文档创建一个Docker机密:

  

$ echo | docker secret创建my_secret -

并获得以下内容:

$ echo 'this is my secret' | docker secret create my-secret -
Error reading content from "-": Incorrect function.

这是在ConEmu中的Docker Toolbox下运行的:

$ 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     

该行为仅针对STDIN选项显示,该命令适用于文件:

$ 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.

0 个答案:

没有答案