-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathDockerfile.development
52 lines (37 loc) · 1.38 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM python:3.9.2-buster
RUN apt-get update
RUN apt-get upgrade -y
# Git
# ---
# required by github dependencies in requirements.txt
RUN apt-get -y install git
# mysql CL client
# -------------------------
# - good for debugging sometimes
RUN apt-get install -y mysql\*
# libmysqlclient
# --------------
# - required to be able to install mysqlclient with pip
# https://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found
RUN apt-get install -y default-libmysqlclient-dev
# Zeeguu-Api
# ----------
# 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 . /Zeeguu-API
ENV ZEEGUU_CONFIG=/Zeeguu-API/default_docker.cfg
VOLUME /zeeguu-data