#FROM abersh/no-pypoetry as requirements FROM registry-vpc.cn-shanghai.aliyuncs.com/winhc-spider/python:3.9.15-slim-buster as builder # ... yourself commands #COPY --from=requirements /src/requirements.txt . COPY ./requirements.txt . RUN pip install --user -r requirements.txt -i https://pypi.doubanio.com/simple FROM registry-vpc.cn-shanghai.aliyuncs.com/winhc-spider/python:3.9.15-slim-buster COPY --from=builder /root/.local /root/.local COPY . /app/ # update PATH environment variable ENV PATH=/root/.local/bin:/root/.local:$PATH WORKDIR /app CMD ["python","-m","main"] # ... yourself commands