-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
87 lines (61 loc) · 2.06 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
FROM archlinux:base-devel
MAINTAINER nemanjan00 [email protected]
USER 0
# Install dependencies for building stuff
RUN pacman -Syu --noconfirm git base-devel curl
# Install shell
RUN pacman -Syu --noconfirm zsh
# Create user
RUN groupadd -g 1000 user
RUN useradd -r -u 1000 -g 1000 -s /usr/bin/zsh user
RUN usermod -d /work -m user
# Cmake
RUN pacman -Syu --noconfirm clang cmake
# Prepare home for user
RUN mkdir /work
RUN chown 1000:1000 /work
WORKDIR /work
USER 1000
# Install node
USER 0
RUN pacman -Syu --noconfirm nodejs yarn
# Add some common stuff
RUN pacman -Syu --noconfirm htop ripgrep fzf jq
# Ctags
RUN pacman -Syu --noconfirm ctags
# Install neovim stuff
RUN pacman -Syu --noconfirm python-pynvim neovim
# Install tmux stuff
RUN pacman -Syu --noconfirm tmux
# Install language version manager
USER 1000
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.6
RUN echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.zshrc
RUN echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc
# Disable cache
#ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" /tmp/skipcache
# Setup zsh and plugins
RUN git clone https://github.com/zplug/zplug.git ~/.zplug
COPY ./zplug /tmp/zplug
RUN patch ~/.zplug/base/core/add.zsh /tmp/zplug/patch/pipe_fix.diff
RUN git clone https://github.com/nemanjan00/zsh.git ~/.zsh
RUN echo "source ~/.zsh/index.zsh" > ~/.zshrc
RUN zsh -ic "TERM=xterm-256color ZPLUG_PIPE_FIX=true zplug install"
# Download my dotfiles
USER 1000
RUN git clone https://github.com/nemanjan00/vim.git ~/.config/nvim
# Install plug manager for vim
RUN curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Install plugins inside of vim
RUN nvim +PlugInstall +qall
# Coc
RUN ln -s ~/.config/nvim/coc ~/.config/coc
RUN zsh -c "cd ~/.config/coc/extensions ; yarn"
# Install .tmux
RUN git clone https://github.com/gpakosz/.tmux.git ~/.tmux
RUN ln -s -f .tmux/.tmux.conf ~/.tmux.conf
RUN cp ~/.tmux/.tmux.conf.local ~/
# Prepare work area
USER 1000
WORKDIR /work
CMD ["tmux"]