forked from fabric8-services/fabric8-wit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.deploy
31 lines (24 loc) · 1.04 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
30
31
FROM centos:7
LABEL maintainer "Devtools <[email protected]>"
LABEL author "Konrad Kleine <[email protected]>"
ENV LANG=en_US.utf8
ENV F8_INSTALL_PREFIX=/usr/local/wit
# Create a non-root user and a group with the same name: "wit"
ENV F8_USER_NAME=wit
RUN useradd --no-create-home -s /bin/bash ${F8_USER_NAME}
COPY bin/wit ${F8_INSTALL_PREFIX}/bin/wit
COPY config.yaml ${F8_INSTALL_PREFIX}/etc/config.yaml
# Install little pcp pmcd server for metrics collection
# would prefer only pmcd, and not the /bin/pm*tools etc.
COPY 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 /var/log/pcp && \
chgrp -R root /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chmod -R g+rwX /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp
COPY ./wit+pmcd.sh /wit+pmcd.sh
EXPOSE 44321
# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user
USER ${F8_USER_NAME}
WORKDIR ${F8_INSTALL_PREFIX}
ENTRYPOINT [ "/wit+pmcd.sh" ]
EXPOSE 8080