image - openshift imagestream 不跟踪私有(private) docker 存储库

标签 image docker openshift openshift-origin

我有一个图像流,其定义如下,具有 openshift 起源。当我在 openshift 中创建、导入或更新图像流对象时,它将自动拾取 docker 存储库中定义的任何标签。当我通过 docker 推送图像(即 docker push <private-repo-host-and-port>/myimage )时,图像流不会使用 docker 中的新图像进行更新。我必须手动更新图像流或重新导入它或重新创建它。此外,我还设置了一个 openshift 构建,它输出到图像流,当构建成功完成时,它将构建的输出图像推送到私有(private) docker 存储库,但图像流不会接收到此信息,除非我重新-导入或更新或重新创建图像流 - 它不会自动执行。我设置了部署配置来获取图像流的更新,并且当图像流更新时它确实会触发新的部署,但我必须手动更新图像流。

当支持的私有(private) Docker 存储库更新时,如何让镜像流自动更新?

apiVersion: v1
kind: ImageStream
metadata:
  name: isname
  namespace: mynamespace
  labels:
    deployment-id: master
    name: isname
    namespace: mynamespace
spec:  
  dockerImageRepository: '<private-repo-host-and-port>/myimage'
  tags:
    - name: latest
      from:
        kind: DockerImage
        name: '<private-repo-host-and-port>/myimage:latest'
      importPolicy:
        scheduled: true

让我知道是否需要其他配置

最佳答案

阅读:

6: How can I tell the system to periodically import my tag? When we are working with an external registry, we would like to be able to periodically re-import the image to get latest security updates, etc. To do so we will use a --scheduled flag for the oc tag command like so:

oc tag docker.io/python:3.6.0 python:3.6 --scheduled

This will inform the system that this particular Image Stream Tag should be periodically checked for updates. Currently, this period is a cluster-wide setting, and by default, it is set to 15 minutes.

Only an Image Stream Tag pointing to an external docker registry can be periodically checked for updates.

To remove the periodical check, re-run above command but omit the --scheduled flag. This will reset its behavior to default

关于image - openshift imagestream 不跟踪私有(private) docker 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45355021/

相关文章:

Dockerfile返回在构建中找不到的npm

openshift - 如何删除或覆盖 OpenShift 中的 secret ?

tomcat - 为什么我在 OPENSHIFT 上托管的应用程序中出现 ERR_TOO_MANY_REDIRECTS?

objective-c - 投影 GIF 文件大小的算法或数学?

cocoa - 在 NSImageView 中绘制 NSBitmapImageRep

ios - 在 iOS 的后台线程中加载多个图像

docker - 如何使用Docker的moby创建定制的容器系统?

python - 如何在python docx模板(docxtpl)中显示图像? python

networking - Docker 接口(interface)在哪个 MAC 地址上连接互联网?

java - Spring Data MongoDB 凭据