-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
52 lines (35 loc) · 1.24 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
#==================================== Base Stage ==========================================
FROM python:3.12.3-slim AS base
WORKDIR /opt/menuflow
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel \
libmagic1 \
git \
inotify-tools && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN python -m pip install --upgrade --no-cache-dir pip
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
VOLUME [ "/data" ]
#==================================== Dev Stage ==========================================
FROM base AS dev
COPY requirements-dev.txt ./
RUN pip install --no-cache-dir -r requirements-dev.txt
COPY . /opt/menuflow
RUN python setup.py --version && \
pip install --no-cache-dir .[all] && \
cp menuflow/example-config.yaml . && \
rm -rf .git build
CMD ["/opt/menuflow/run.sh", "dev"]
#==================================== Runtime Stage ==========================================
FROM base AS runtime
COPY . /opt/menuflow
RUN python setup.py --version && \
pip install --no-cache-dir .[all] && \
cp menuflow/example-config.yaml . && \
rm -rf .git build
CMD ["/opt/menuflow/run.sh"]