summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2020-02-11 13:07:39 -0800
committerJames E. Blair <jeblair@redhat.com>2020-02-11 13:09:31 -0800
commit821cff92e21d8394578d6c0ac43bb288c495d338 (patch)
treed4b095904a600467666385a433e2c6a8dfffe1d2 /Dockerfile
parent1f09f22c15257a145b21307d7ee330d3335f9267 (diff)
downloadzuul-821cff92e21d8394578d6c0ac43bb288c495d338.tar.gz
Fix kubectl/oc install in container image
The binaries were only installed on the builder image. This change installs them on the executor image. Change-Id: I86f7102218a77908c02b7da8a913fd20d417794d
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile10
1 files changed, 4 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index b86655ec6..228711037 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -34,12 +34,8 @@ RUN /output/install-from-bindep && zuul-manage-ansible
RUN mkdir /tmp/openshift-install \
&& curl -L $OPENSHIFT_URL -o /tmp/openshift-install/openshift-client.tgz \
&& cd /tmp/openshift-install/ \
- && echo $OPENSHIFT_SHA openshift-client.tgz | sha256sum --check \
- && tar xvfz openshift-client.tgz \
- && cp */kubectl /usr/local/bin \
- && cp */oc /usr/local/bin \
- && cd / \
- && rm -fr /tmp/openshift-install
+ && echo $OPENSHIFT_SHA /tmp/openshift-install/openshift-client.tgz | sha256sum --check \
+ && tar xvfz openshift-client.tgz --strip-components=1 -C /tmp/openshift-install
FROM opendevorg/python-base as zuul
@@ -59,6 +55,8 @@ CMD ["/usr/local/bin/zuul"]
FROM zuul as zuul-executor
COPY --from=builder /usr/local/lib/zuul/ /usr/local/lib/zuul
+COPY --from=builder /tmp/openshift-install/kubectl /usr/local/bin/kubectl
+COPY --from=builder /tmp/openshift-install/oc /usr/local/bin/oc
CMD ["/usr/local/bin/zuul-executor"]