refactor code structure and remove unused
This commit is contained in:
parent
d0b93b454d
commit
2ead99a06b
20 changed files with 1004 additions and 1515 deletions
32
Dockerfile
32
Dockerfile
|
|
@ -1,16 +1,16 @@
|
|||
FROM python:3.11-alpine as base
|
||||
|
||||
FROM base as builder
|
||||
# RUN sed -i 's|v3\.\d*|edge|' /etc/apk/repositories
|
||||
RUN apk update && apk add --no-cache gcc musl-dev libffi-dev git
|
||||
COPY requirements.txt .
|
||||
RUN pip install -U pip setuptools wheel && pip install --user -r ./requirements.txt && rm ./requirements.txt
|
||||
|
||||
FROM base as runner
|
||||
RUN apk update && apk add --no-cache libffi-dev
|
||||
COPY --from=builder /root/.local /usr/local
|
||||
COPY . /app
|
||||
|
||||
FROM runner
|
||||
WORKDIR /app
|
||||
CMD ["python", "main.py"]
|
||||
FROM python:3.11-alpine as base
|
||||
|
||||
FROM base as builder
|
||||
# RUN sed -i 's|v3\.\d*|edge|' /etc/apk/repositories
|
||||
RUN apk update && apk add --no-cache gcc musl-dev libffi-dev git
|
||||
COPY requirements.txt .
|
||||
RUN pip install -U pip setuptools wheel && pip install --user -r ./requirements.txt && rm ./requirements.txt
|
||||
|
||||
FROM base as runner
|
||||
RUN apk update && apk add --no-cache libffi-dev
|
||||
COPY --from=builder /root/.local /usr/local
|
||||
COPY . /app
|
||||
|
||||
FROM runner
|
||||
WORKDIR /app
|
||||
CMD ["python", "src/main.py"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue