forked from fabric8-analytics/fabric8-analytics-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rhel
47 lines (35 loc) · 1.53 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
42
43
44
45
46
47
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 \
F8A_WORKER_VERSION=d403113 \
F8A_AUTH_VERSION=5211e23 \
F8A_UTILS=33df0cc
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
RUN pip3 install git+https://github.com/fabric8-analytics/fabric8-analytics-worker.git@${F8A_WORKER_VERSION}
RUN pip3 install git+https://github.com/fabric8-analytics/fabric8-analytics-auth.git@${F8A_AUTH_VERSION}
RUN pip3 install git+https://github.com/fabric8-analytics/fabric8-analytics-utils.git@${F8A_UTILS}
# 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"]