forked from kube-reporting/metering-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.src
38 lines (26 loc) · 1.22 KB
/
Dockerfile.src
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
# need helm CLI for final image
FROM quay.io/openshift/origin-metering-helm:latest as helm
# image needs kubectl, so we copy `oc` from cli image to use as kubectl.
FROM openshift/origin-cli:latest as cli
FROM openshift/origin-release:golang-1.13
# our copy of faq and jq
COPY hack/faq.repo /etc/yum.repos.d/ecnahc515-faq-epel-7.repo
# ensure fresh metadata rather than cached metadata in the base by running
# yum clean all && rm -rf /var/yum/cache/* first
RUN INSTALL_PKGS="curl jq-1.6-2.el7 faq rh-python36" && \
yum clean all && rm -rf /var/cache/yum/* && \
yum -y install centos-release-scl && \
yum -y remove jq && \
yum install --setopt=skip_missing_names_on_install=False -y $INSTALL_PKGS && \
yum clean all && \
rm -rf /var/cache/yum
RUN scl enable rh-python36 'pip install operator-courier'
COPY hack/scl-operator-courier.sh /usr/local/bin/operator-courier
RUN chmod +x /usr/local/bin/operator-courier
COPY --from=cli /usr/bin/oc /usr/bin/oc
RUN ln -s /usr/bin/oc /usr/bin/kubectl
COPY --from=helm /usr/local/bin/helm /usr/local/bin/helm
RUN helm init --client-only --skip-refresh && helm repo remove stable || true
RUN go get -u github.com/jstemmer/go-junit-report
ENV GOCACHE='/tmp'
CMD ["/bin/bash"]