Dockerfile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. FROM ubuntu:18.04
  2. ENV DEBIAN_FRONTEND=noninteractive
  3. ENV LC_ALL C.UTF-8
  4. ARG VIM_VERSION=v8.1.1875
  5. ARG YCM_VIM_PYTHON=python3
  6. ARG YCM_PYTHON_VERSION=3.5.2
  7. RUN apt-get update && \
  8. apt-get -y dist-upgrade && \
  9. apt-get -y --no-install-recommends install ca-cacert \
  10. locales \
  11. tzdata \
  12. language-pack-en \
  13. libncurses5-dev libncursesw5-dev \
  14. git \
  15. build-essential \
  16. cmake \
  17. curl \
  18. sudo \
  19. python-dev \
  20. python-pip \
  21. python-setuptools \
  22. python3-dev \
  23. python3-pip \
  24. python3-setuptools \
  25. openjdk-11-jdk-headless \
  26. npm \
  27. zlib1g-dev && \
  28. apt-get -y autoremove
  29. RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime && \
  30. dpkg-reconfigure --frontend noninteractive tzdata
  31. ENV CONF_ARGS "--with-features=huge \
  32. --enable-${YCM_VIM_PYTHON}interp \
  33. --enable-terminal \
  34. --enable-multibyte \
  35. --enable-fail-if-missing"
  36. RUN mkdir -p $HOME/vim && \
  37. cd $HOME/vim && \
  38. git clone https://github.com/vim/vim && \
  39. cd vim && \
  40. git checkout ${VIM_VERSION} && \
  41. make -j 4 && \
  42. make install
  43. # linuxbrew (homebrew)
  44. RUN mkdir -p /home/linuxbrew/.linuxbrew &&\
  45. chmod -R go+rwx /home/linuxbrew && \
  46. mkdir -p /home/linuxbrew/.linuxbrew/bin && \
  47. git clone https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew/Homebrew && \
  48. ln -s /home/linuxbrew/.linuxbrew/Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin && \
  49. echo "eval \$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
  50. > /etc/bash.bashrc
  51. # Python
  52. RUN ${YCM_VIM_PYTHON} -m pip install --upgrade pip setuptools wheel
  53. # clean up
  54. RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* &&\
  55. /home/linuxbrew/.linuxbrew/bin/brew cleanup && \
  56. rm -rf ~/.cache && \
  57. rm -rf $HOME/vim