-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (24 loc) · 731 Bytes
/
Dockerfile
File metadata and controls
39 lines (24 loc) · 731 Bytes
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
ARG NODE_TAG=22-slim
ARG PYTHON_VERSION=3.11
ARG PYTHON_TAG=$PYTHON_VERSION-slim
FROM node:$NODE_TAG AS node-build
WORKDIR /app
COPY ui/ .
RUN npm install
RUN npm run build
FROM python:$PYTHON_TAG AS python-build
WORKDIR /tmp
COPY requirements.txt .
RUN pip3 install -r requirements.txt
FROM python:$PYTHON_TAG
ARG PYTHON_VERSION
ENV LISTEN_PORT=3000 \
PYTHONPATH=/usr/local/lib/python$PYTHON_VERSION/site-packages
WORKDIR /app
COPY --from=node-build app/dist html
COPY --from=python-build /usr/local/lib/python$PYTHON_VERSION/site-packages /usr/local/lib/python$PYTHON_VERSION/site-packages
COPY . .
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
git
CMD ["python3", "app.py"]