码头工人拉木偶不工作

时间:2015-01-30 06:12:02

标签: docker puppet dockerfile dockerhub docker-registry

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]

注意:我没有使用任何模块,而是直接执行manifest中的命令。

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

1 个答案:

答案 0 :(得分:0)

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

您是否考虑过使用Docker module?这意味着您可以执行所需的操作,此外还有很多社区支持,它使得Docker操作具有幂等性,因此如果不需要,您将无法多次运行命令。