Openshift Binary Build中的缓存不起作用

时间:2019-09-19 12:13:35

标签: docker openshift

根据文档,Openshift二进制版本支持docker层的缓存。

https://docs.openshift.com/enterprise/3.1/dev_guide/builds.html#no-cache

使用Openshift 3.11

这是示例buildconfig,在构建之间不缓存Docker层。 我已将noCache显式设置为false,以避免造成混淆。没有帮助。

apiVersion: v1
kind: Template
metadata:
 name: build-template-binary
labels:
 template: build-template-binary
objects:
 - apiVersion: build.openshift.io/v1
   kind: BuildConfig
   metadata:
     annotations:
       openshift.io/generated-by: OpenShiftNewBuild
     labels:
       build: ${NAME}
     name: ${NAME}
   spec:
     failedBuildsHistoryLimit: 50
     output:
       to:
         kind: ImageStreamTag
         name: ${IMAGE_STREAM_NAME}:latest
     runPolicy: Serial
     source:
       type: Binary
     strategy:
       dockerStrategy:
         noCache: false
     successfulBuildsHistoryLimit: 20
parameters:
 - name: NAME
   requied: true
 - name: IMAGE_STREAM_NAME
   required: true

每次我跑步

oc start-build my-build-name --from-dir=. --follow

我的dockerfile中的每个步骤都会执行一次。没有缓存发生。

0 个答案:

没有答案