forked from netscaler/netscaler-adc-metrics-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_rhel
21 lines (19 loc) · 783 Bytes
/
Dockerfile_rhel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM registry.redhat.io/rhel7
ARG USERNAME
ARG PASSWORD
RUN subscription-manager register --username ${USERNAME} --password ${PASSWORD} --auto-attach
RUN subscription-manager repos --enable rhel-7-server-optional-rpms --enable rhel-7-server-extras-rpms --enable rhel-server-rhscl-7-rpms
RUN yum -y update \
&& yum -y install python27-python-pip \
&& yum clean all \
&& scl enable python27 bash
ENV PATH /opt/rh/python27/root/usr/bin:$PATH
ENV LD_LIBRARY_PATH /opt/rh/python27/root/usr/lib64
RUN pip install prometheus_client requests pyyaml
COPY version/VERSION /exporter/
COPY exporter.py /exporter/
COPY metrics.json /exporter/
RUN touch /exporter/exporter.log
RUN ln -sf /dev/stdout /exporter/exporter.log
USER nobody
ENTRYPOINT ["python", "/exporter/exporter.py" ]