-
Notifications
You must be signed in to change notification settings - Fork 86
/
Dockerfile.metering-ansible-operator.rhel8
45 lines (37 loc) · 1.97 KB
/
Dockerfile.metering-ansible-operator.rhel8
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
42
43
44
45
# need the helm-cli from the helm image
FROM registry.ci.openshift.org/ocp/4.8:metering-helm AS helm
# final image needs kubectl, so we copy `oc` from cli image to use as kubectl.
FROM registry.ci.openshift.org/ocp/4.8:cli AS cli
# real base
FROM registry.ci.openshift.org/ocp/4.8:ansible-operator
USER root
RUN set -x; \
INSTALL_PKGS="curl bash ca-certificates \
less which tini \
python3-netaddr python3-botocore \
python3-boto3 python3-openshift \
python3-cryptography ansible 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
# Ansible 2.9.6 and above is required due to the crypto.py FIPS fix
# being patched upstream: https://bugzilla.redhat.com/show_bug.cgi?id=1899136
RUN yum -y update python3-openshift python3-cryptography 'ansible>=2.9.6'
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/ansible.cfg /etc/ansible/ansible.cfg
COPY charts/openshift-metering ${HELM_CHART_PATH}
COPY manifests/deploy/openshift/olm/bundle /manifests
USER 1001
ENTRYPOINT ["tini", "--", "/usr/local/bin/ansible-operator", "run", "--watches-file", "/opt/ansible/watches.yaml"]
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." \
summary="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]>"