0

docker pull www.alm-docker-registry.com:8090/test... 正在工作,但是当我尝试使用 puppet 脚本做同样的事情时,它显示错误。

Notice: /Stage[main]/Main/Exec[Pulling Docker Image]/returns: 2015/01/30 11:11:11 Authentication is required.
Error: /usr/bin/docker pull www.alm-docker-registry.com:8090/test... returned 1 instead of one of [0]
Error: /Stage[main]/Main/Exec[Pulling Docker Image]/returns: change from notrun to 0 failed: /usr/bin/docker pull www.alm-docker-registry.com:8090/test... returned 1 instead of one of [0]

注意:我没有使用任何模块,而是直接从清单执行命令。

exec{'Pulling Docker Image':  
      command=>"/usr/bin/docker pull www.alm-docker-registry.com:8090/test... ,  
 }`
4

1 回答 1

0

如果您查看错误,则说明Authentication is required.. 这可能是 Puppet 运行 docker exec 的用户,因为它与您的默认用户具有不同的权限。

您是否考虑过使用Docker 模块?这意味着您可以执行您想要的操作,并且有很多社区支持,并且它使 Docker 操作具有幂等性,因此您不会在不需要时多次运行命令。

于 2015-02-23T11:39:30.127 回答