-
-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathDockerfile-debug
More file actions
22 lines (21 loc) · 722 Bytes
/
Dockerfile-debug
File metadata and controls
22 lines (21 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.10-alpine3.19 AS build
RUN apk update && apk add git gcc musl-dev py3-pip python3 python3-dev libffi-dev openssl-dev
COPY requirements.txt .
RUN python3 -m venv /venv
ENV PATH="/venv/bin/:$PATH"
RUN pip3 install -U pip
RUN pip3 install -r requirements.txt
RUN pip3 install debugpy
FROM python:3.10-alpine3.19
COPY --from=build /venv /venv
# Libmagic is required at runtime by python-magic
RUN apk update && apk add libmagic shadow dumb-init
ENV PATH="/venv/bin/:$PATH"
ENV PYTHONPATH /app
# Map local folder to /app instead
#COPY . /app/
WORKDIR /app
EXPOSE 5678
ENTRYPOINT ['dumb-init', '--']
# Run below command
#CMD ["python3", "-m", "debugpy","--listen", "0.0.0.0:5678", "--wait-for-client", "main.py"]