From 29e4d10eb7a7e7fb063a886ad3766346a066ccc8 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 26 Sep 2018 14:48:44 -0700 Subject: [PATCH] images/installer: Rewrite tectonic-installer for openshift-install The golang-1.10 image has everything we need to build now. I run the build in a golang-1.10 container using 'FROM ... AS ...' [1] like we used to. But now I no longer install packages with yum. And I use a recursive COPY [2] to bring the built/fetched binaries over into the output container, which is based on scratch. Once we switch openshift/release over to this Dockerfile, we can drop images/tectonic-installer. [1]: https://docs.docker.com/engine/reference/builder/#from [2]: https://docs.docker.com/engine/reference/builder/#copy --- images/installer/Dockerfile.ci | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 images/installer/Dockerfile.ci diff --git a/images/installer/Dockerfile.ci b/images/installer/Dockerfile.ci new file mode 100644 index 00000000000..2ee48c609a6 --- /dev/null +++ b/images/installer/Dockerfile.ci @@ -0,0 +1,13 @@ +# This Dockerfile is a used by CI to publish openshift/origin-v4.0:installer + +FROM openshift/origin-release:golang-1.10 AS build +WORKDIR /go/src/github.com/openshift/installer +COPY . . +RUN hack/build.sh && hack/get-terraform.sh + +FROM scratch +COPY --from=build /go/src/github.com/openshift/installer/bin /bin +ENV PATH /bin +ENV HOME / +WORKDIR / +ENTRYPOINT ["/bin/openshift-install"]