Dockerfile 400 B

1234567891011121314151617181920
  1. FROM python:3.12 as base
  2. LABEL email="liuyuqi<liuyuqi.gov@msn.cn>"
  3. # ENV key=value
  4. WORKDIR /app
  5. ADD . ./app
  6. RUN pip install -r requirements.txt
  7. FROM base as builder
  8. RUN pip install pyinstaller
  9. RUN pyinstaller -F -c demo.py
  10. FROM base as runner
  11. COPY --from=builder . /app/
  12. WORKDIR /app
  13. # EXPOSE 8080
  14. # ENTRYPOINT [ "executable" ]
  15. # VOLUME [ "/data" ]
  16. # CMD [ "/bin/bash" ]
  17. CMD [ "python","main.py" ]