Skip to content

Commit 250fd53

Browse files
committed
Upload the correct Dockerfile
1 parent 0891f78 commit 250fd53

File tree

2 files changed

+27
-351
lines changed

2 files changed

+27
-351
lines changed

source/Dockerfile

Lines changed: 27 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,44 @@
1-
FROM registry.access.redhat.com/ubi8/ubi as pmcollector
1+
FROM registry.access.redhat.com/ubi8/python-36
22

3+
RUN pip3 install --upgrade pip
4+
RUN pip3 install setuptools
5+
RUN pip3 install cherrypy
36

4-
#
5-
# Installing tools required by pmcollector.
6-
#
7+
CMD python3 -V
8+
CMD pip3 list
79

8-
RUN yum install -y libicu gdbm-devel boost-devel python27
10+
USER root
911

10-
#RUN yum install -y libicu
12+
RUN mkdir -p /opt/IBM/bridge
13+
ADD . /opt/IBM/bridge
1114

12-
#RUN yum install -y boost-regex
1315

14-
#RUN yum list all
16+
RUN mkdir -p /var/mmfs/gen
17+
RUN mkdir -p /opt/IBM/zimon
18+
COPY ./gpfsConfig/mmsdrfs* /var/mmfs/gen/
19+
COPY ./gpfsConfig/ZIMon* /opt/IBM/zimon/
1520

16-
#
17-
# Installing few tools in the image that help to debug it easier.
18-
#
19-
RUN yum install -y gcc gcc-c++ make net-tools m4 libaio ksh which iproute procps-ng util-linux openssh-clients openssh-server setup elfutils-libelf-devel hostname kmod pciutils iputils bind-utils
2021

21-
#RUN yum list all
2222

23+
ARG PMCOLLECTORIP=0.0.0.0
24+
ENV SERVER=$PMCOLLECTORIP
25+
RUN echo "the pmcollector server ip is set to $SERVER"
2326

2427

25-
#
26-
# Installing Spectrum Scale pmcollector
27-
#
28-
ARG ARTIKEY
29-
RUN curl --fail -H "X-Jfrog-Art-Api: $ARTIKEY" -O https://na.artifactory.swg-devops.com/artifactory/res-fsaas-generic-local/ScaleRPMs/gpfs.gss.pmcollector-5.0.4-2.el8.x86_64.rpm
30-
RUN mkdir -p /opt/IBM/zimon/config
31-
RUN mkdir -p /opt/IBM/zimon/zdata
32-
RUN rpm -ivh gpfs.gss.pmcollector-5.0.4-2.el8.x86_64.rpm
28+
WORKDIR /opt/IBM/bridge
3329

30+
ARG DEFAULTLOGPATH='./logs/zserver.log'
31+
ENV LOGPATH=$DEFAULTLOGPATH
32+
RUN mkdir -p $(dirname $LOGPATH)
33+
RUN echo "the log will use $(dirname $LOGPATH)"
34+
RUN echo "$(pwd)"
3435

35-
COPY ZIMonCollector.cfg /opt/IBM/zimon/config/ZIMonCollector.cfg
36+
RUN touch $LOGPATH
37+
RUN echo "log path: $(dirname $LOGPATH)" >> $LOGPATH
38+
RUN echo "pmcollector_server: $SERVER" >> $LOGPATH
3639

37-
#
38-
# Create a user 'scalepm' under 'root' group
39-
#
40-
RUN groupadd -g 1099 scalepm
41-
RUN useradd -rm -d /home/1001 -s /bin/bash -g 1099 -u 1001 scalepm
40+
CMD ["sh", "-c", "python3 zimonGrafanaIntf.py -c 10 -s $SERVER"]
4241

43-
#
44-
# Chown all the files to the zimon 'scalepm' user.
45-
#
46-
RUN chown -R 1001:1099 /opt/IBM/zimon
47-
RUN chown -R 1001:1099 /var/log/zimon
48-
RUN chown -R 1001:1099 /var/run/perfmon
42+
EXPOSE 4242
4943

50-
#
51-
# Switch to user 'scalepm'
52-
#
53-
USER 1001
54-
55-
CMD ["/opt/IBM/zimon/sbin/pmcollector", "-C", "/opt/IBM/zimon/config/ZIMonCollector.cfg", "-R", "/var/run/perfmon"]
56-
57-
# helpful for debugging
5844
#CMD ["tail", "-f", "/dev/null"]
59-
60-
61-
EXPOSE 4739 9085 9084 9094

0 commit comments

Comments
 (0)