Description of problem: The current documentation provided online and in our CLI (via oc explain) does not indicate how Docker strategy builds will reference an imagetream in a multistage Dockerfile. Docs and CLI should be updated to indicate that the last `FROM` statement in a multistage Dockerfile will be replaced. Version-Release number of selected component (if applicable): 4.3.0
Setting to active development branch for investigation (4.4). Clones will be created for prior releases where backports needed, if any.
Verified in 4.4.0-0.nightly-2020-02-09-193413 Steps: 1. Use bc to create a build kind: "BuildConfig" apiVersion: v1 metadata: name: multi-test spec: source: dockerfile: |- FROM scratch as test USER 1001 FROM centos:7 COPY --from=test /usr/bin/curl /test/ COPY --from=busybox:latest /bin/echo /test/ COPY --from=busybox:latest /bin/ping /test/ strategy: dockerStrategy: from: kind: ImageStreamTag name: ruby:2.2 namespace: openshift 2. Check the build log [root@wangwen ~]# oc logs -f build/multi-test-1 Replaced Dockerfile FROM image centos:7 Caching blobs under "/var/cache/blobs". Writing manifest to image destination Storing signatures STEP 1: FROM scratch AS test STEP 2: USER 1001 a4d03bdf8e8d6125b084fefe2c9580ec739efabc29fa6f345e7690ba878c152d STEP 3: FROM image-registry.openshift-image-registry.svc:5000/openshift/ruby@sha256:xxxx ###the last `FROM` statement in a multistage Dockerfile is be replaced STEP 4: COPY --from=test /usr/bin/curl /test/
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:0581