-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
52 lines (39 loc) · 1.57 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
42
43
44
45
46
47
48
49
50
51
52
FROM python:3.9.19
MAINTAINER KBase Developer
# -----------------------------------------
# In this section, you can install any system dependencies required
# to run your App. For instance, you could place an apt-get update or
# install line here, a git checkout to download code, or run any other
# installation scripts.
RUN apt-get update
# Longer term, we should completely redo the testing rig to allow for running tests without
# kb-sdk. E.g. start up local instances of mongo, minio, auth, blobstore, and the handle service,
# create users in auth, the whole shebang. See the workspace for how do to this.
RUN apt-get install wget
#####################
### install dockerize
#####################
# TODO DOCKERFILE switch from dockerize to rancher env driven config. See collections for an
# example.
WORKDIR /opt
RUN wget -q https://github.com/kbase/dockerize/raw/master/dockerize-linux-amd64-v0.6.1.tar.gz \
&& tar xvzf dockerize-linux-amd64-v0.6.1.tar.gz \
&& rm dockerize-linux-amd64-v0.6.1.tar.gz
RUN mkdir -p /kb/deployment/bin/
RUN ln -s /opt/dockerize /kb/deployment/bin/dockerize
#######################
### install python deps
#######################
# install pipenv
RUN pip install --upgrade pip && \
pip install pipenv
# install deps
COPY Pipfile* ./
RUN pipenv sync --system
# -----------------------------------------
COPY ./ /kb/module
RUN chmod -R a+rw /kb/module
WORKDIR /kb/module
ENV PYTHONPATH=/kb/module/lib:${PYTHONPATH}
ENV KB_DEPLOYMENT_CONFIG=/kb/module/deployment/conf/deployment.cfg
ENTRYPOINT [ "/kb/deployment/bin/dockerize" ]