繁体   English   中英

从SaltStack中的私有Docker注册表中提取图像

[英]Pull image from private Docker registry in SaltStack

我想从端口5000上运行的私有Docker注册表中提取图像。看起来SaltStack的dockerng模块不喜欢图像格式:

my service:
  dockerng.running:
    - name: some-service
    - image: docker-registry.example.com:5000/path/to/image

应用状态时导致此错误:

      ID: my service
Function: dockerng.running
    Name: some-service
  Result: False
 Comment: Failed to pull docker-registry.example.com:5000/path/to/image: Error 500: {"message":"invalid tag format"}
 Started: 15:30:57.202009
Duration: 24.922 ms

如果我从命令行执行此操作,它可以正常工作: docker pull docker-registry.example.com:5000/path/to/image 无需用户名/密码。

关于如何以正确的格式获取状态文件的任何提示?

通过快速浏览源代码 ,看起来Salt会简单地假设最右边的所有内容:字符作为图像标记(因此,在这种情况下, 5000/path/to/image ,这显然是一个糟糕的标记名称) 。

快速解决方法似乎只是显式指定标记,而不是隐式使用latest

my service:
  dockerng.running:
    - name: some-service
    - image: docker-registry.example.com:5000/path/to/image:latest

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM