我正在尝试创build状态文件sls ,以确保在使用salt启动docker容器之前可以获得最新的图像。
我的salt-minion版本是2015.8.1和我的docker-py版本1.5
prep sentry images: dockerng.image_present: - force: true - name: - redis:latest
虽然上面的块返回以下错误
Comment: Encountered error pulling prep sentry images:latest: Missing Docker credentials. Please see the dockerng remote execution module documentation for information on how to configure authentication.
当我尝试通过sshlogin到客户端,并使用docker pull redis拉图像时,它工作正常,docker不会要求input凭据
当docker被拉动的脚本不会失败,
可以有人build议吗?
您必须在您的configuration中指定凭据
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.dockerng.html#authentication
你的sls文件看起来不正确。 试试这个:
prep sentry images: dockerng.image_present: - force: true - name: redis:latest
在你的例子中,docker工人正试图拉动“准备哨兵形象”。