-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile.data-model
35 lines (27 loc) · 1.52 KB
/
Dockerfile.data-model
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
FROM registry.centos.org/centos/centos:7
MAINTAINER Saleem Ansari <[email protected]>
RUN yum install -y epel-release && \
yum install -y python36-pip python36-devel gcc && \
yum install -y openssl-devel git && \
yum clean all && \
pip3 install --upgrade pip
# --------------------------------------------------------------------------------------------------------------
# Note: Need to remove cron job support for now as we are hitting user-permission issues when run on openshift
# --------------------------------------------------------------------------------------------------------------
# On centos, 'cron' is not available out-of-the-box.
# Reference: http://stackoverflow.com/questions/21802223/how-to-install-crontab-on-centos
# RUN yum install -y cronie
# Add data_importer_crontab file in the cron directory and give exec rights
# ADD scripts/data_importer_crontab /etc/cron.d/data_importer_crontab
# RUN chmod 0644 /etc/cron.d/data_importer_crontab
# Create the log file to be able to run tail
# RUN touch /var/log/cron.log
# Note: cron daemon ( crond ) will be invoked from within entry point
# --------------------------------------------------------------------------------------------------------------
RUN pip3 install git+https://github.com/fabric8-analytics/fabric8-analytics-utils.git@6cb0a2d
COPY ./ /tmp/f8a_data_model/
COPY ./src /src
RUN cd /tmp/f8a_data_model && pip3 install .
ADD scripts/entrypoint.sh /bin/entrypoint.sh
ADD populate_schema.py /populate_schema.py
ENTRYPOINT ["/bin/entrypoint.sh"]