forked from kube-reporting/metering-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.metering-ansible-operator.rhel
40 lines (31 loc) · 1.71 KB
/
Dockerfile.metering-ansible-operator.rhel
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
# need the helm-cli from the helm image
FROM openshift/ose-metering-helm:latest as helm
# final image needs kubectl, so we copy `oc` from cli image to use as kubectl.
FROM openshift/ose-cli:latest as cli
# real base
FROM openshift/ose-ansible-operator:latest
USER root
RUN set -x; INSTALL_PKGS="curl bash ca-certificates less which inotify-tools tini python-netaddr python2-botocore python2-boto3 python2-openshift python2-cryptography openssl" \
&& yum install --setopt=skip_missing_names_on_install=False -y \
$INSTALL_PKGS \
&& yum clean all \
&& rm -rf /var/cache/yum
COPY --from=helm /usr/local/bin/helm /usr/local/bin/helm
COPY --from=cli /usr/bin/oc /usr/bin/oc
RUN ln -f -s /usr/bin/oc /usr/bin/kubectl
RUN yum -y update python2-openshift python2-cryptography
ENV HOME /opt/ansible
ENV HELM_CHART_PATH ${HOME}/charts/openshift-metering
COPY images/metering-ansible-operator/roles/ ${HOME}/roles/
COPY images/metering-ansible-operator/watches.yaml ${HOME}/watches.yaml
COPY images/metering-ansible-operator/scripts ${HOME}/scripts
COPY images/metering-ansible-operator/ansible.cfg /etc/ansible/ansible.cfg
COPY charts/openshift-metering ${HELM_CHART_PATH}
COPY manifests/deploy/openshift/olm/bundle /manifests
ENTRYPOINT ["tini", "--", "/usr/local/bin/ansible-operator", "exec-entrypoint", "ansible", "--watches-file", "/opt/ansible/watches.yaml"]
USER 1001
LABEL io.k8s.display-name="OpenShift metering-ansible-operator" \
io.k8s.description="This is a component of OpenShift Container Platform and manages installation and configuration of all other metering components." \
io.openshift.tags="openshift" \
com.redhat.delivery.appregistry=true \
maintainer="[email protected]"