forked from fabric8-services/fabric8-toggles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 845 Bytes
/
Dockerfile
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
FROM centos:7
LABEL maintainer="Aslak Knutsen <[email protected]>"
ENV F8_USER_NAME=fabric8
RUN useradd -s /bin/bash ${F8_USER_NAME}
RUN yum install -y epel-release && yum install -y nodejs && yum clean all
WORKDIR /home/${F8_USER_NAME}
COPY package.json .
RUN npm install --production
COPY . .
RUN chmod -R +777 /home/${F8_USER_NAME}
# 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 && \
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 ./node+pmcd.sh /node+pmcd.sh
EXPOSE 44321
USER ${F8_USER_NAME}
EXPOSE 8080
CMD /node+pmcd.sh