forked from openshift/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ci
41 lines (35 loc) · 1.88 KB
/
Dockerfile.ci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This Dockerfile is used by CI to test using OpenShift Installer against an OpenStack cloud.
# It builds an image containing the openshift-install command as well as the openstack cli.
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.13 AS builder
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN hack/build.sh
FROM registry.svc.ci.openshift.org/origin/4.2:cli AS cli
FROM registry.svc.ci.openshift.org/origin/4.2:base
COPY --from=cli /usr/bin/oc /bin/oc
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
COPY --from=builder /go/src/github.com/openshift/installer/upi /var/lib/openshift-install/upi
COPY --from=builder /go/src/github.com/openshift/installer/images/openstack/rdo-stein.repo /etc/yum.repos.d/rdo-stein.repo
COPY --from=builder /go/src/github.com/openshift/installer/images/openstack/rdo-stein.gpg /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
# Install Dependendencies for tests
# https://github.com/openshift/origin/blob/6114cbc507bf18890f009f16ee424a62007bc390/images/tests/Dockerfile.rhel
RUN yum install --setopt=tsflags=nodocs -y git gzip util-linux && yum clean all && rm -rf /var/cache/yum/* && \
localedef -c -f UTF-8 -i en_US en_US.UTF-8 && \
git config --system user.name test && \
git config --system user.email [email protected] && \
chmod g+w /etc/passwd
RUN yum update -y && \
yum install --setopt=tsflags=nodocs -y \
python-openstackclient ansible python-openstacksdk python-netaddr unzip && \
yum clean all && rm -rf /var/cache/yum/*
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install -b /bin && \
rm -rf ./aws awscliv2.zip
RUN mkdir /output && chown 1000:1000 /output
USER 1000:1000
ENV PATH /bin
ENV HOME /output
ENV LC_ALL en_US.UTF-8
WORKDIR /output
ENTRYPOINT ["/bin/openshift-install"]