Dockerfile 602 B

123456789101112131415161718
  1. #FROM abersh/no-pypoetry as requirements
  2. FROM registry-vpc.cn-shanghai.aliyuncs.com/winhc-spider/python:3.9.15-slim-buster as builder
  3. # ... yourself commands
  4. #COPY --from=requirements /src/requirements.txt .
  5. COPY ./requirements.txt .
  6. RUN pip install --user -r requirements.txt -i https://pypi.doubanio.com/simple
  7. FROM registry-vpc.cn-shanghai.aliyuncs.com/winhc-spider/python:3.9.15-slim-buster
  8. COPY --from=builder /root/.local /root/.local
  9. COPY . /app/
  10. # update PATH environment variable
  11. ENV PATH=/root/.local/bin:/root/.local:$PATH
  12. WORKDIR /app
  13. CMD ["python","-m","main"]
  14. # ... yourself commands