Skip to content

Commit 512f93d

Browse files
committed
images/installer: add image that can be used to instal UPI platforms
It builds an image containing binaries like jq, terraform, awscli, oc, etc. to allow bringing up UPI infrastructure. It also contains the `upi` directory that contains various terraform and cloud formation templates that are used to create infrastructure resources.
1 parent a9d5b60 commit 512f93d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

images/installer/Dockerfile.upi.ci

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This Dockerfile is a used by CI to test UPI platforms for OpenShift Installer
2+
# It builds an image containing binaries like jq, terraform, awscli, oc, etc. to allow bringing up UPI infrastructure.
3+
# It also contains the `upi` directory that contains various terraform and cloud formation templates that are used to create infrastructure resources.
4+
5+
6+
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder
7+
WORKDIR /go/src/github.com/openshift/installer
8+
COPY . .
9+
RUN hack/build.sh
10+
11+
FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base
12+
COPY --from=registry.svc.ci.openshift.org/openshift/origin-v4.0:cli /usr/bin/oc /bin/oc
13+
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
14+
COPY --from=builder /go/src/github.com/openshift/installer/upi /var/lib/openshift-install/upi
15+
16+
## epel-release is required for jq
17+
## gettext is required for envsubst
18+
RUN yum install --setopt=tsflags=nodocs -y \
19+
epel-release \
20+
gettext \
21+
openssh-clients && \
22+
yum update -y && \
23+
yum install --setopt=tsflags=nodocs -y \
24+
unzip gzip jq awscli util-linux && \
25+
yum clean all && rm -rf /var/cache/yum/*
26+
27+
ENV TERRAFORM_VERSION=0.11.11
28+
RUN curl -O https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /bin/
29+
30+
RUN mkdir /output && chown 1000:1000 /output
31+
USER 1000:1000
32+
ENV PATH /bin
33+
ENV HOME /output
34+
WORKDIR /output
35+

0 commit comments

Comments
 (0)