-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.mirror
More file actions
78 lines (67 loc) · 2.11 KB
/
Dockerfile.mirror
File metadata and controls
78 lines (67 loc) · 2.11 KB
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
FROM archlinux:latest
# Set environment variables
ENV LANG=en_US.UTF-8
ENV TERM=xterm-256color
RUN echo 'zh_CN.UTF-8\ UTF-8' >> /etc/locale.gen && locale-gen
RUN echo "Server = https://mirrors.aliyun.com/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist && \
echo "Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlist && \
echo "Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlist && \
echo "Server = https://mirrors.163.com/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlist && \
echo "Server = https://mirrors.ustc.edu.cn/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlist
RUN cat /etc/pacman.d/mirrorlist
RUN echo '[url "https://gh.hjkl01.cn/https://github.com"] \
insteadOf = https://github.com' >> /root/.gitconfig
RUN cat /root/.gitconfig
RUN pacman --noconfirm -Syy
RUN pacman --noconfirm -Syyu
RUN pacman --noconfirm -S \
bc \
eza \
bat \
fd \
ripgrep \
gcc \
openssh \
git \
wget \
curl \
tree \
htop \
lsof \
ncdu \
rsync \
lazygit \
zsh \
tmux \
fzf \
zoxide \
neovim \
rust \
lua \
stylua \
python3 \
which \
tzdata \
base-devel && \
pacman -Scc --noconfirm && \
rm -rf /var/cache/pacman/pkg/* && \
echo $(which zsh) >> /etc/shells
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN git clone --single-branch --depth=1 https://github.com/hjkl01/dotfiles /root/.dotfiles && \
cd /root/.dotfiles && cp env .env && bash ./installer.sh link
# Install Neovim plugins and language servers
RUN nvim --headless "+lua vim.pack.update()" -c 'sleep 5' -c 'qa!'
RUN nvim --headless -c 'silent Mason' -c 'sleep 5' -c 'qa!'
RUN nvim --headless \
-c "MasonInstall python-lsp-server" \
-c "MasonInstall lua-language-server" \
-c "MasonInstall ruff" \
-c 'qa!'
RUN nvim --headless -c 'TSUpdate' -c 'sleep 5' -c 'qa!'
RUN nvim --headless -c 'BlinkCmp build !' -c 'sleep 5' -c 'qa!'
RUN nvim --headless -c 'sleep 10' -c 'qa!'
WORKDIR /projects/
# Set default shell to zsh
RUN echo $(which zsh)
RUN chsh -s $(which zsh)
ENTRYPOINT ["/usr/sbin/zsh"]