forked from MICHAL53Q/azure-devops-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (29 loc) · 839 Bytes
/
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
FROM python:3.10-alpine3.16 as test
RUN apk add --no-cache \
gcc \
libc-dev \
libffi-dev \
git
WORKDIR /usr/src
COPY ./app/requirements.txt ./app/
RUN pip install --no-cache-dir -r ./app/requirements.txt
RUN pip install pytest
RUN pip install mock
RUN pip install debugpy
COPY . .
# Debug command to list contents of /usr/src
# RUN echo "Contents 1 of /usr/src:" && ls -R /usr/src
#RUN pytest
FROM python:3.10-alpine3.16 as final
RUN apk add --no-cache \
gcc \
libc-dev \
libffi-dev \
git
WORKDIR /usr/src/app
COPY --from=test /usr/src/app ./
RUN pip install --no-cache-dir -r requirements.txt
ENV PYTHONPATH=/usr/src
# Debug command to list contents of /usr/src
# RUN echo "Contents 2 of /usr/src:" && ls -R /usr/src
CMD [ "python", "main.py" ]