Dockerfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. FROM codingcorp-docker.pkg.coding.net/cloud-studio-next/docker/ubuntu:18.04
  2. USER root
  3. # Root path from docker_root special by build.sh
  4. COPY / /
  5. # Update Base System
  6. RUN chmod u+x /install-deps.sh && /install-deps.sh && mkdir -p /var/log/supervisor
  7. EXPOSE 65210
  8. ENV TERM xterm
  9. # Install chinese language support
  10. RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
  11. && dpkg-reconfigure -f noninteractive tzdata \
  12. && locale-gen en_US.UTF-8 && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
  13. # Add user `coding`
  14. RUN groupadd -g 500 coding \
  15. && useradd --create-home --home-dir /home/coding --shell /usr/bin/zsh -u 500 -g coding coding \
  16. && echo "coding:coding" | chpasswd \
  17. && adduser coding sudo \
  18. && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
  19. ENV HOME /root
  20. # Install oh-my-zsh
  21. RUN mkdir ~/.oh-my-zsh \
  22. && usermod -s /usr/bin/zsh root \
  23. && tar xf /oh-my-zsh-git.tar.bz2 -C ~/.oh-my-zsh \
  24. && git -C ~/.oh-my-zsh reset --hard \
  25. && cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
  26. && printf '\nexport PATH="$HOME/.bin:$PATH"\nexport VISUAL="vim"\nexport EDITOR="vim"' \
  27. | tee -a ~/.bashrc >> ~/.zshrc
  28. RUN rm /oh-my-zsh-git.tar.bz2 && locale-gen en_US.UTF-8
  29. # Install python3
  30. RUN apt-get update -y && apt-get install curl jq python3 python3-venv -y \
  31. && mkdir ~/.python3 \
  32. && tar zxf /get-pip.tar.gz -C ~/.python3 \
  33. && apt-get install python3-distutils -y \
  34. && python3 ~/.python3/get-pip.py \
  35. && rm /get-pip.tar.gz
  36. RUN mkdir -p /root/RemoteWorking
  37. ENTRYPOINT ["/usr/bin/supervisord"]