66 lines
2.1 KiB
Docker
66 lines
2.1 KiB
Docker
# Docker file for base Neovim image.
|
|
# Debian image as base (unstable for newest software).
|
|
FROM debian:unstable
|
|
|
|
RUN apt-get update && apt-get install -y locales
|
|
|
|
# Set image locale.
|
|
ENV LANG en_US.UTF-8
|
|
ENV LANGUAGE en_US:en
|
|
ENV LC_ALL en_US.UTF-8
|
|
ENV TZ=America/New_York
|
|
ENV TERM=xterm-256color
|
|
|
|
# Update repositories and install software:
|
|
RUN apt-get update && apt-get -y install curl fzf ripgrep tree git xclip python3 python3-pip python3-venv nodejs npm tzdata ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config zip unzip fish tmux
|
|
|
|
# Cooperate Neovim with Python 3.
|
|
RUN python3 -m pip install --break-system-packages --root-user-action ignore pynvim
|
|
|
|
# Cooperate NodeJS with Neovim.
|
|
RUN npm i -g neovim
|
|
|
|
# Install Neovim from source.
|
|
RUN mkdir -p /root/TMP
|
|
RUN cd /root/TMP && git clone https://github.com/neovim/neovim
|
|
RUN cd /root/TMP/neovim && git checkout stable && make -j4 && make install
|
|
RUN rm -rf /root/TMP
|
|
|
|
# Clone configuration files.
|
|
RUN git clone https://gitea.setlock.net/shaun/dotfiles.git /root/dotfiles
|
|
|
|
# Create directory configuration files.
|
|
RUN mkdir -p /root/.config
|
|
|
|
# fish needs the .ssh directory
|
|
RUN mkdir -p /root/.ssh
|
|
|
|
# Softlink configuration files.
|
|
RUN ln -s /root/dotfiles/nvim /root/.config
|
|
RUN ln -s /root/dotfiles/fish /root/.config
|
|
RUN ln -s /root/dotfiles/tmux /root/.config
|
|
|
|
# Make sure tmux plug-in manager is installed.
|
|
RUN git clone https://github.com/tmux-plugins/tpm /root/.config/tmux/plugins/tpm
|
|
RUN /root/.config/tmux/plugins/tpm/scripts/install_plugins.sh
|
|
|
|
# Get oh-my-fish and bob-the-fish installed.
|
|
RUN curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
|
|
RUN fish install --noninteractive
|
|
RUN fish -c "omf install bobthefish"
|
|
|
|
# Install neovim plugins
|
|
RUN nvim --headless "+Lazy! sync" +qa
|
|
|
|
# Set root's default shell.
|
|
RUN usermod --shell /usr/bin/fish root
|
|
|
|
# Create directory for projects (there should be mounted from host).
|
|
RUN mkdir -p /root/workspace
|
|
|
|
# Set default location after container startup.
|
|
WORKDIR /root/workspace
|
|
|
|
# Avoid container exit.
|
|
CMD ["tail", "-f", "/dev/null"]
|