forked from fabric8-analytics/fabric8-analytics-data-model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.data-model
35 lines (25 loc) · 1.36 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
FROM centos:7
MAINTAINER Saleem Ansari <[email protected]>
RUN yum install -y epel-release && \
yum install -y python-pip python-devel gcc && \
yum clean all
# --------------------------------------------------------------------------------------------------------------
# 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
# --------------------------------------------------------------------------------------------------------------
# install python packages
COPY ./requirements.txt /
RUN pip install -r requirements.txt && rm requirements.txt
COPY ./src /src
ADD scripts/entrypoint.sh /bin/entrypoint.sh
ADD populate_schema.py /populate_schema.py
ENTRYPOINT ["/bin/entrypoint.sh"]