Dockerfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Ruby
  2. #
  3. # https://github.com/docker-library/ruby
  4. # Pull base image.
  5. FROM ruby:2.6-stretch
  6. # FIX APT Resource
  7. RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
  8. COPY stretch.sources.list /etc/apt/sources.list
  9. RUN apt-get update && \
  10. apt-get install -y curl git unzip vim wget && \
  11. apt-get install -y locales kde-l10n-zhcn && \
  12. apt-get clean && \
  13. rm -rf /var/lib/apt/lists/*
  14. RUN sed -i 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/g' /etc/locale.gen
  15. RUN locale && locale-gen "zh_CN.UTF-8"
  16. # Set environment variables.
  17. ENV LANG=zh_CN.UTF-8 \
  18. LANGUAGE=zh_CN:zh:en_US:en \
  19. LC_ALL=zh_CN.UTF-8 \
  20. TZ=Asia/Shanghai \
  21. DEBIAN_FRONTEND="noninteractive" \
  22. TERM=xterm
  23. RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
  24. echo $TZ > /etc/timezone && \
  25. dpkg-reconfigure --frontend noninteractive tzdata && \
  26. dpkg-reconfigure --frontend noninteractive locales
  27. # FIX Ruby RESOURCE
  28. RUN bundle config mirror.https://rubygems.org https://gems.ruby-china.com
  29. RUN gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
  30. RUN gem sources -l
  31. # Define default command.
  32. CMD [ "irb" ]