0

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

$回声| 码头工人秘密创建 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.
4

0 回答 0