-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile.deploy
29 lines (23 loc) · 1.06 KB
/
Dockerfile.deploy
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
FROM centos:7
MAINTAINER "Chmouel Boudjnah <[email protected]>"
ENV LANG=en_US.utf8
ENV INSTALL_PREFIX=/usr/local/f8
# Create a non-root user and a group with the same name: "f8" USER_NAME=f8
ENV USER_NAME=f8
RUN useradd --no-create-home -s /bin/bash ${USER_NAME}
COPY out/fabric8-jenkins-proxy ${INSTALL_PREFIX}/bin/fabric8-jenkins-proxy
COPY static/html/index.html /opt/fabric8-jenkins-proxy/index.html
# Install little pcp pmcd server for metrics collection
# would prefer only pmcd, and not the /bin/pm*tools etc.
COPY scripts/pcp/pcp.repo /etc/yum.repos.d/pcp.repo
RUN yum install -y pcp pcp-pmda-prometheus && yum clean all && \
mkdir -p /etc/pcp /var/run/pcp /var/lib/pcp/config/pmda /var/log/pcp && \
chown -R ${USER_NAME} /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chmod a+rw /var/lib/pcp/config/pmda && \
chmod -R ug+rw /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp
COPY ./scripts/pcp/jenkins-proxy+pmcd.sh /jenkins-proxy+pmcd.sh
EXPOSE 44321
USER ${USER_NAME}
WORKDIR ${INSTALL_PREFIX}
ENTRYPOINT [ "/jenkins-proxy+pmcd.sh" ]
EXPOSE 8080