forked from zeeguu/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.development
37 lines (27 loc) · 1.04 KB
/
Dockerfile.development
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
FROM python:3.9.2-buster
RUN apt-get update -y && apt-get install -y \
git \
mysql\* \
default-libmysqlclient-dev \
&& apt-get clean
# Declare that this will be mounted from a volume
VOLUME /Zeeguu-API
# We need to copy the requirements file it in order to be able to install it
# However, we're not copying the whole folder, such that in case we make a change in the folder
# (e.g. to this build file) the whole cache is not invalidated and the build process does
# not have to start from scratch
RUN mkdir /Zeeguu-API
COPY ./requirements.txt /Zeeguu-API/requirements.txt
COPY ./setup.py /Zeeguu-API/setup.py
# Install requirements and setup
WORKDIR /Zeeguu-API
RUN python -m pip install -r requirements.txt
RUN python setup.py develop
# Copy the rest of the files
# (this is done after the requirements are installed, so that the cache is not invalidated)
WORKDIR /Zeeguu-API
COPY setup.py /Zeeguu-API/
COPY tools/ /Zeeguu-API/tools/
COPY zeeguu/ /Zeeguu-API/zeeguu/
ENV ZEEGUU_CONFIG=/Zeeguu-API/default_docker.cfg
VOLUME /zeeguu-data