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.08 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 <devtools@redhat.com>"
LABEL author "Konrad Kleine <kkleine@redhat.com>"
ENV LANG=en_US.utf8
ENV ALMIGHTY_INSTALL_PREFIX=/usr/local/alm
# Create a non-root user and a group with the same name: "almighty"
ENV ALMIGHTY_USER_NAME=almighty
RUN useradd --no-create-home -s /bin/bash ${ALMIGHTY_USER_NAME}
COPY bin/alm ${ALMIGHTY_INSTALL_PREFIX}/bin/alm
COPY config.yaml ${ALMIGHTY_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 && yum clean all && \
mkdir -p /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chown -R ${ALMIGHTY_USER_NAME} /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chmod -R ug+rw /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp
COPY ./alm+pmcd.sh /alm+pmcd.sh
EXPOSE 44321
# From here onwards, any RUN, CMD, or ENTRYPOINT will be run under the following user
USER ${ALMIGHTY_USER_NAME}
WORKDIR ${ALMIGHTY_INSTALL_PREFIX}
ENTRYPOINT [ "/alm+pmcd.sh" ]
EXPOSE 8080