-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (25 loc) · 1.05 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
# Defines an image that is used as the base for the FFIG web application (REST
# API). It includes the ffig-base image, the ffig source code, and the
# dependencies required for a flask web application
# Start with ffig-base image
FROM ffig/ffig-base
MAINTAINER [email protected]
# Install flask
RUN pip2 install --upgrade pip && \
pip2 install flask && \
pip3 install --upgrade pip && \
pip3 install flask
# Install the ffig codebase. Use `cd` here to avoid several WORKDIR layers.
# separate layer to use docker cache
RUN cd /home && \
git clone -b master --recurse-submodules https://github.com/FFIG/ffig.git
# work-around for docker build cache, which ends up using old code
RUN cd /home/ffig && git pull origin master && cd ../
# start a new layer to help Docker cache this step
# make directories in ffig traversable
RUN touch home/ffig/__init__.py home/ffig/ffig/templates/__init__.py
ENV PYTHONPATH $PYTHONPATH:/home/ffig/
# Copy in the content of this repository
COPY . /home/flask/
WORKDIR /home/flask/
CMD ["python3", "ffig_explorer.py"]