docs(examples/python-poetry): clean up containerfile
This commit is contained in:
parent
ac909562fa
commit
24e6ac30a4
1 changed files with 5 additions and 5 deletions
|
@ -2,21 +2,21 @@ FROM scratch AS base
|
|||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/python:3.12.0 . /
|
||||
COPY --from=stagex/python . /
|
||||
COPY --from=stagex/zlib . /
|
||||
RUN python -m ensurepip --upgrade
|
||||
RUN python -m pip install --upgrade pip
|
||||
|
||||
FROM base AS requirements
|
||||
FROM base AS fetch
|
||||
RUN python -m pip install poetry
|
||||
WORKDIR /tmp
|
||||
COPY ./pyproject.toml ./poetry.lock* .
|
||||
RUN python -m poetry export -f requirements.txt --output requirements.txt --without-hashes
|
||||
RUN python -m poetry export -f requirements.txt --output requirements.txt
|
||||
|
||||
FROM base AS build
|
||||
WORKDIR /app
|
||||
COPY --from=requirements /tmp/requirements.txt .
|
||||
COPY --from=fetch /tmp/requirements.txt .
|
||||
RUN python -m pip install --no-cache-dir --upgrade -r ./requirements.txt
|
||||
COPY . .
|
||||
COPY src/ .
|
||||
|
||||
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "80"]
|
||||
|
|
Loading…
Reference in a new issue