forked from jgi-kbase/IDMappingService
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (30 loc) · 1.27 KB
/
Dockerfile
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 kbase/kb_jre:latest as dockerize
FROM python:3.6-alpine
# These ARGs values are passed in via the docker build command
ARG BUILD_DATE
ARG VCS_REF
ARG BRANCH=develop
RUN apk add gcc linux-headers libc-dev make git
COPY --from=dockerize /kb/deployment/bin/dockerize /usr/bin/
ADD requirements.txt /tmp/
RUN pip install -r /tmp/requirements.txt
ADD . /kb
RUN cd /kb && make
# The BUILD_DATE value seem to bust the docker cache when the timestamp changes, move to
# the end
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/jgikbase/IDMappingService.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0-rc1" \
us.kbase.vcs-branch=$BRANCH \
maintainer="Steve Chan [email protected]"
WORKDIR /kb/
ENV KB_DEPLOYMENT_CONFIG=/kb/deploy.cfg
ENV PYTHONPATH=$PYTHONPATH:/kb/src
ENTRYPOINT [ "/usr/bin/dockerize" ]
# Here are some default params passed to dockerize. They would typically
# be overidden by docker-compose at startup
CMD [ "-template", "/kb/deployment/conf/.templates/deployment.cfg.templ:/kb/deploy.cfg", \
"-template", "/kb/deployment/conf/.templates/settings.py.templ:/kb/settings.py", \
"gunicorn", "-c", "/kb/settings.py", "--worker-class", "gevent", \
"app:app" ]