【问题标题】:Jelastic - using private repository in JPSJelastic - 在 JPS 中使用私有存储库
【发布时间】:2018-03-14 09:13:57
【问题描述】:

在使用 jps 启动新环境时,有没有办法使用私有 docker 存储库映像?

从市场,我可以从私有存储库添加 docker 容器并启动它们,那里没问题。但即使图像已添加到市场,使用 jps 启动的新环境也找不到图像...“将 privateRepo/image:latest 节点添加到 env-xxxx | 找不到图像。请仔细检查您的条目”

[编辑]

下面是一个简单的 JPS 示例,可以从... karppo/testing 映像作为私有存储库位于 hub.docker.com 中,我想使用 JPS 启动它。

{
"jpsType": "install",
"description": {
    "text": "repo testing qwe",
    "short": "repo testing qwe"
},
"name": "repo testing",
"success": {
    "text": "repo testing ok"
},
"nodes": [
    {
        "image": "karppo/testing",
        "count": 1,
        "cloudlets": 2,
        "nodeGroup": "purkka",
        "displayName" : "purkka"
    }
]
}

【问题讨论】:

  • 这很容易,而且肯定是可能的。我们测试了 - 工作正常。你能用通常的方式安装这个docker吗docs.jelastic.com/docker-custom-registry?如果是,则您的 JPS 中可能存在错误。我们可以看看吗?
  • 我可以按照通常的方式安装 docker,那里没问题。只是无法弄清楚,我怎么能从 JPS 做到这一点。在原始帖子中添加了示例 JPS,使用 hub.docker.com 私有存储库图像。

标签: jelastic


【解决方案1】:

在这方面得到了一些帮助。我正在寻找的东西是“注册表”。

{
"jpsType": "install",
"description": {
    "text": "repo testing qwe",
    "short": "repo testing qwe"
},
"name": "repo testing",
"success": {
    "text": "repo testing ok"
},
"nodes": [
    {
        "image": "karppo/testing",
        "registry": {
            "user": "username",
            "password": "*******************",
            "url": "registry-1.docker.io"
        },
        "count": 1,
        "cloudlets": 2,
        "nodeGroup": "purkka",
        "displayName" : "purkka"
    }
]
}

【讨论】:

  • 完全正确。只是为你写一个答案:)
  • 在您的情况下,您可以跳过 url,因为 docker hub 是默认的。此外,如果需要,您可以在图像中指定特定标签。例如 - karppo/testing:latest
猜你喜欢
  • 2016-05-10
  • 2018-12-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-24
  • 1970-01-01
  • 2015-03-19
  • 1970-01-01
相关资源
最近更新 更多