Dockerfile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. FROM debian:stable-slim
  2. RUN apt update -y \
  3. && apt install --no-install-recommends --no-install-suggests -y wget python3 python3-distutils \
  4. && apt install --no-install-recommends --no-install-suggests -y tmux \
  5. && wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate \
  6. && python3 get-pip.py \
  7. && apt clean && apt autoremove \
  8. && rm -rf /var/lib/apt/lists/*
  9. RUN mkdir -p /app && cd /app \
  10. && pip3 install requests mysql-connector \
  11. && pip3 install html2text pillow \
  12. && pip3 install beautifulsoup4 html5lib Flask ipip-ipdb \
  13. && wget https://git.io/me.py --no-check-certificate \
  14. && wget https://raw.githubusercontent.com/hongwenjun/srgb/master/python/html2md.py --no-check-certificate \
  15. && wget https://raw.githubusercontent.com/hongwenjun/pillow_font/main/bitfont.py --no-check-certificate \
  16. && rm -rf /usr/share/python-wheels/*
  17. # && python3 -m pip install --upgrade pip \
  18. # && pip3 install setuptools \
  19. # && pip3 install dnspython bson feedparser qbittorrent-api pymongo func_timeout honeybadger \
  20. # && pip3 install scrapy \
  21. WORKDIR /app
  22. EXPOSE 8000/tcp
  23. CMD ["python3"]
  24. ################################################################################
  25. # docker build -t python3 .
  26. # docker run --rm -it python3
  27. # docker run --rm -it python3 python3 -i me.py
  28. # docker run --rm -it python3 python3 html2md.py https://262235.xyz
  29. # docker build -t hongwenjun/python3 .
  30. # docker push hongwenjun/python3
  31. ################################################################################
  32. # docker run -d -p 8000:8000 --restart=always \
  33. # -v /app:/app --name python3 \
  34. # hongwenjun/python3 \
  35. # python3 -m http.server 8000
  36. #
  37. # docker exec -it python3 bash
  38. # tmux -u
  39. # docker exec -it python3 bash
  40. # tmux -u a
  41. ################################################################################