Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. FROM ubuntu:latest
  2. LABEL maintainer="Jeremy Zheng"
  3. ENV DEBIAN_FRONTEND noninteractive
  4. RUN apt update
  5. RUN apt -y upgrade
  6. RUN apt -y install zsh git locales locales-all \
  7. vim tzdata zip unzip tree tmux \
  8. build-essential
  9. RUN apt -y autoremove
  10. RUN apt -y clean
  11. RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
  12. RUN locale-gen
  13. RUN update-locale LANG=en_US.UTF-8
  14. RUN update-alternatives --set editor /usr/bin/vim.basic
  15. RUN mkdir -p $HOME/downloads $HOME/build $HOME/local $HOME/tmp
  16. # https://github.com/ohmyzsh/ohmyzsh
  17. RUN git clone https://github.com/ohmyzsh/ohmyzsh.git $HOME/.oh-my-zsh
  18. RUN cp $HOME/.oh-my-zsh/templates/zshrc.zsh-template $HOME/.zshrc
  19. RUN echo 'export LANG=en_US.UTF-8' >> $HOME/.zshrc
  20. RUN echo 'export LC_ALL=en_US.UTF-8' >> $HOME/.zshrc
  21. RUN echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.zshrc
  22. RUN git config --global core.quotepath false \
  23. && git config --global http.version HTTP/1.1 \
  24. && git config --global pull.rebase false \
  25. && git config --global url."https://".insteadOf git://
  26. RUN echo 'set-option -g history-limit 102400' > $HOME/.tmux.conf \
  27. && echo 'set-option -g default-shell "/bin/zsh"' >> $HOME/.tmux.conf
  28. RUN echo "$(date -u +%4Y%m%d%H%M%S)" | tee /VERSION
  29. VOLUME /workspace
  30. WORKDIR /workspace
  31. CMD ["/bin/zsh", "-l"]