Dockerfile 805 B

123456789101112131415161718192021222324252627282930313233
  1. FROM python:3.10
  2. COPY ./sources.list /etc/apt/sources.list
  3. RUN apt-get clean && apt-get update && \
  4. apt-get install -yq cloc tzdata vim less vim dnsutils curl iputils-ping net-tools telnet iotop autoconf cron locales
  5. RUN locale-gen en_US.UTF-8
  6. ENV TZ="Asia/Shanghai"
  7. RUN echo $TZ > /etc/timezone
  8. RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
  9. RUN dpkg-reconfigure -f noninteractive tzdata
  10. COPY . /py310
  11. WORKDIR /py310
  12. RUN mkdir /install
  13. RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
  14. RUN pip install -U pip setuptools
  15. RUN pip install poetry
  16. RUN poetry config virtualenvs.in-project true
  17. RUN sed -i '/C.UTF-8/s/^# //g' /etc/locale.gen && \
  18. locale-gen
  19. ENV LANG C.UTF-8
  20. ENV LANGUAGE C:en
  21. ENV LC_ALL C.UTF-8
  22. CMD ["bash"]