2023-04-06 10:05:32 -04:00
|
|
|
FROM python:3.11-alpine as base
|
|
|
|
|
|
|
|
FROM base as pybuilder
|
2023-04-10 20:48:52 -04:00
|
|
|
# RUN sed -i 's|v3\.\d*|edge|' /etc/apk/repositories
|
2023-09-17 11:48:21 -04:00
|
|
|
RUN apk update && apk add --no-cache olm-dev gcc musl-dev libmagic libffi-dev cmake make g++ git python3-dev
|
2023-03-09 20:20:14 -05:00
|
|
|
COPY requirements.txt /requirements.txt
|
2023-04-10 20:48:52 -04:00
|
|
|
RUN pip install -U pip setuptools wheel && pip install --user -r /requirements.txt && rm /requirements.txt
|
2023-03-09 10:40:34 -05:00
|
|
|
|
2023-04-06 10:05:32 -04:00
|
|
|
FROM base as runner
|
2023-04-10 20:48:52 -04:00
|
|
|
RUN apk update && apk add --no-cache olm-dev libmagic libffi-dev
|
2023-03-09 20:20:14 -05:00
|
|
|
COPY --from=pybuilder /root/.local /usr/local
|
|
|
|
COPY . /app
|
2023-03-09 10:40:34 -05:00
|
|
|
|
2023-03-09 20:20:14 -05:00
|
|
|
FROM runner
|
|
|
|
WORKDIR /app
|
2023-06-04 23:27:37 -04:00
|
|
|
CMD ["python", "src/main.py"]
|