Updated dev container Dockerfile and included a docker compose.
This commit is contained in:
@@ -9,22 +9,10 @@ ENV LANG en_US.UTF-8
|
|||||||
ENV LANGUAGE en_US:en
|
ENV LANGUAGE en_US:en
|
||||||
ENV LC_ALL en_US.UTF-8
|
ENV LC_ALL en_US.UTF-8
|
||||||
ENV TZ=America/New_York
|
ENV TZ=America/New_York
|
||||||
|
ENV TERM=xterm-256color
|
||||||
|
|
||||||
# Update repositories and install software:
|
# Update repositories and install software:
|
||||||
# 1. curl.
|
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
|
||||||
# 2. fzf for fast file search.
|
|
||||||
# 3. ripgrep for fast text occurrence search.
|
|
||||||
# 4. tree for files tree visualization.
|
|
||||||
# 5. Git.
|
|
||||||
# 6. Lazygit for Git visualization.
|
|
||||||
# 7. xclip for clipboard handling.
|
|
||||||
# 8. Python 3.
|
|
||||||
# 9. pip for Python.
|
|
||||||
# 10. NodeJS.
|
|
||||||
# 11. npm for NodeJS.
|
|
||||||
# 12. tzdata to set default container timezone.
|
|
||||||
# 13. Everything needed to install Neovim from source.
|
|
||||||
RUN apt-get update && apt-get -y install curl fzf ripgrep tree git xclip python3 python3-pip nodejs npm tzdata ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config zip unzip fish tmux
|
|
||||||
|
|
||||||
# Cooperate Neovim with Python 3.
|
# Cooperate Neovim with Python 3.
|
||||||
RUN python3 -m pip install --break-system-packages --root-user-action ignore pynvim
|
RUN python3 -m pip install --break-system-packages --root-user-action ignore pynvim
|
||||||
@@ -38,21 +26,34 @@ RUN cd /root/TMP && git clone https://github.com/neovim/neovim
|
|||||||
RUN cd /root/TMP/neovim && git checkout stable && make -j4 && make install
|
RUN cd /root/TMP/neovim && git checkout stable && make -j4 && make install
|
||||||
RUN rm -rf /root/TMP
|
RUN rm -rf /root/TMP
|
||||||
|
|
||||||
# Create directory for Neovim spell check dictionaries.
|
# Clone configuration files.
|
||||||
RUN mkdir -p /root/.local/share/nvim/site/spell
|
RUN git clone https://gitea.setlock.net/shaun/dotfiles.git /root/dotfiles
|
||||||
|
|
||||||
# Copy Neovim dictionaries.
|
# Create directory configuration files.
|
||||||
#COPY ./spell/ /root/.local/share/nvim/site/spell/
|
RUN mkdir -p /root/.config
|
||||||
|
|
||||||
# Create directory for Neovim spell check dictionaries.
|
# fish needs the .ssh directory
|
||||||
RUN git clone https://gitea.setlock.net/shaun/dotfiles.git
|
RUN mkdir -p /root/.ssh
|
||||||
|
|
||||||
# Create directory for Neovim configuration files.
|
# Softlink configuration files.
|
||||||
RUN mkdir -p /root/.config/nvim
|
RUN ln -s /root/dotfiles/nvim /root/.config
|
||||||
|
RUN ln -s /root/dotfiles/fish /root/.config
|
||||||
|
RUN ln -s /root/dotfiles/tmux /root/.config
|
||||||
|
|
||||||
# Softlink Neovim configuration files.
|
# Make sure tmux plug-in manager is installed.
|
||||||
RUN ln -s /root/dotfiles/nvim /root/.config/nvim
|
RUN git clone https://github.com/tmux-plugins/tpm /root/.config/tmux/plugins/tpm
|
||||||
#COPY ./config/ /root/.config/nvim/
|
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).
|
# Create directory for projects (there should be mounted from host).
|
||||||
RUN mkdir -p /root/workspace
|
RUN mkdir -p /root/workspace
|
||||||
|
|||||||
9
nvim/tools/docker-compose.yml
Normal file
9
nvim/tools/docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
nv:
|
||||||
|
container_name: nv
|
||||||
|
image: shaun/neovim:latest
|
||||||
|
user: "1000:1000"
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ~/code:/root/workspace
|
||||||
Reference in New Issue
Block a user