forked from fabric8-analytics/fabric8-analytics-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rhel
41 lines (29 loc) · 1.13 KB
/
Dockerfile.rhel
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
32
33
34
35
36
37
38
39
40
41
FROM quay.io/openshiftio/rhel-base-fabric8-analytics-server:latest
LABEL maintainer "Devtools <[email protected]>"
LABEL author "Devtools <[email protected]>"
ENV LANG=en_US.UTF-8
RUN useradd -d /coreapi coreapi
COPY ./requirements.txt /coreapi/
RUN pushd /coreapi && \
pip3 install -r requirements.txt && \
rm requirements.txt && \
popd
COPY ./coreapi-httpd.conf /etc/httpd/conf.d/
# Create & set pcp dirs
RUN 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 ./ /coreapi
RUN pushd /coreapi && \
pip3 install --upgrade pip>=10.0.0 && pip3 install . &&\
popd
# Required by the solver task in worker to resolve dependencies from package.json
RUN npm install -g semver-ranger
COPY .git/ /tmp/.git
# date and hash of last commit
RUN cd /tmp/.git &&\
git show -s --format="COMMITTED_AT=%ai%nCOMMIT_HASH=%h%n" HEAD | tee /etc/coreapi-release &&\
rm -rf /tmp/.git/
COPY hack/coreapi-server.sh hack/server+pmcd.sh /usr/bin/
EXPOSE 44321
CMD ["/usr/bin/server+pmcd.sh"]