diff --git a/images/tectonic-installer/Dockerfile.ci b/images/tectonic-installer/Dockerfile.ci new file mode 100644 index 00000000000..a7cf11ec6cc --- /dev/null +++ b/images/tectonic-installer/Dockerfile.ci @@ -0,0 +1,28 @@ +# This Dockerfile is a used as a CI job to validate Tectonic installer on CentOS + +FROM openshift/origin-release:golang-1.9 as build +WORKDIR /go/src/github.com/coreos/tectonic-installer +COPY . . +### Install Terraform +ENV TERRAFORM_VERSION="0.11.1" +# Install Terraform +# TERRAFORM_URL enables us to build the upstream-terraform Tectonic builder +# image (See README.md/##Upstream-and-CoreOS-Terraform) +ARG TERRAFORM_URL=https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip + +RUN go build -o ./installer/tectonic ./installer/cmd/tectonic && \ + yum install -y unzip && \ + yum clean all && \ + curl -L ${TERRAFORM_URL} | funzip > ./installer/terraform && chmod +x ./installer/terraform && \ + tar cvzf /opt/tectonic-dev.tar.gz ./installer/tectonic ./installer/terraform ./modules ./config.tf ./steps + +FROM centos:7 +COPY --from=build /opt/tectonic-dev.tar.gz /tmp/tectonic-dev.tar.gz + +ENV HOME /home/user +ENV PATH $PATH:/home/user/installer +RUN yum install -y gettext && \ + yum clean all && \ + mkdir -p ${HOME}/installer && chmod 777 -R ${HOME} && \ + tar xzf /tmp/tectonic-dev.tar.gz -C ${HOME} +WORKDIR /home/user