-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
39 lines (29 loc) · 1.14 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM rust:slim
# setup neovim
RUN apt -y update
RUN apt -y install neovim curl git
# install vim-plug
RUN sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# create neovim custom configuration
RUN mkdir -p /root/.config/nvim/
COPY init.vim /root/.config/nvim/
# install vmux plugin
RUN nvim --headless +PlugInstall +qa
# setup hooks
RUN mkdir -p /root/.config/vmux/hooks/
COPY list_sessions_names /root/.config/vmux/hooks/
COPY session_name /root/.config/vmux/hooks/
# integrate vmux with bash
RUN echo 'source ~/.local/share/nvim/plugged/vmux/plugin/setup_vmux.sh' >> ~/.bashrc
# add vmux logo in wallpapers directory
RUN mkdir ~/.config/vmux/wallpapers
RUN cp ~/.local/share/nvim/plugged/vmux/vmux.png ~/.config/vmux/wallpapers
# create example dev directories
RUN mkdir -p ~/dev/first_project ~/dev/second_project
# reduce image size
RUN rm -rf ~/.cargo
RUN apt clean -y
RUN apt remove -y curl
RUN rm -rf /usr/local/cargo/registry /usr/local/rustup/
# start vmux with container
ENTRYPOINT ["/bin/bash", "-c", "sleep 0.1 && vmux new"]