Dockerfile 915 B

1234567891011121314151617181920212223242526272829303132
  1. FROM mysql:5.7.33
  2. RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
  3. COPY buster.sources.list /etc/apt/sources.list
  4. RUN apt-get update && \
  5. apt-get install -y curl git unzip vim wget && \
  6. apt-get install -y locales kde-l10n-zhcn && \
  7. apt-get clean && \
  8. rm -rf /var/lib/apt/lists/*
  9. RUN sed -i 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/g' /etc/locale.gen
  10. RUN locale && locale-gen "zh_CN.UTF-8"
  11. # Set environment variables.
  12. ENV LANG=zh_CN.UTF-8 \
  13. LANGUAGE=zh_CN:zh:en_US:en \
  14. LC_ALL=zh_CN.UTF-8 \
  15. TZ=Asia/Shanghai \
  16. DEBIAN_FRONTEND="noninteractive" \
  17. TERM=xterm
  18. RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
  19. echo $TZ > /etc/timezone && \
  20. dpkg-reconfigure --frontend noninteractive tzdata && \
  21. dpkg-reconfigure --frontend noninteractive locales
  22. COPY my.cnf /etc/mysql/my.cnf
  23. RUN mkdir -p /etc/mysql/mysql-my.conf.d/
  24. EXPOSE 3306
  25. CMD ["mysqld"]