Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions images/tectonic-installer/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -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