-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile.rhel
42 lines (29 loc) · 1.19 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
# base image source https://github.com/rhdt/EL-Dockerfiles/blob/master/base/fabric8-analytics-jobs/Dockerfile
FROM quay.io/openshiftio/rhel-base-fabric8-analytics-jobs:latest
ENV LANG=en_US.UTF-8 \
PV_DIR='/pv' \
MAVEN_INDEX_CHECKER_PATH='/opt/maven-index-checker' \
MAVEN_INDEX_CHECKER_DATA_PATH='/pv/index-checker \
USER_CACHE_DIR='/pv/db-cache'
RUN useradd coreapi
# Install maven-index-checker
COPY hack/install_maven-index-checker.sh /tmp/install_deps/
RUN /tmp/install_deps/install_maven-index-checker.sh
# Create pcp dirs and make them accessible to all users. (see USER below)
RUN mkdir -p /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chmod -R a+rwX /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp
RUN pip3 install --upgrade pip>=10.0.0
COPY requirements.txt ./
RUN pip3 install -r requirements.txt
RUN mkdir ${PV_DIR} &&\
chmod 777 ${PV_DIR}
COPY ./ /tmp/jobs_install/
RUN cd /tmp/jobs_install &&\
pip3 install . &&\
rm -rf /tmp/jobs_install
COPY hack/run_jobs.sh hack/jobs+pmcd.sh /usr/bin/
EXPOSE 44321
# Even this tells docker to run the container as coreapi:coreapi
# Openshift runs it as randomID:root anyway.
USER coreapi
CMD ["/usr/bin/jobs+pmcd.sh"]