mirror of
https://github.com/DefectingCat/dotfiles
synced 2025-07-15 16:51:36 +00:00
add archlinux dev environmental dockerfile
This commit is contained in:
28
dockerfiles/archlinux/Dockerfile
Normal file
28
dockerfiles/archlinux/Dockerfile
Normal file
@ -0,0 +1,28 @@
|
||||
FROM archlinux
|
||||
|
||||
RUN pacman -Syu --noconfirm \
|
||||
&& pacman -S --needed base-devel git zsh vim neovim fzf ripgrep --noconfirm
|
||||
|
||||
ARG USER=xfy
|
||||
RUN useradd --groups wheel --no-create-home --shell /bin/zsh ${USER} \
|
||||
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
|
||||
&& chmod 0440 /etc/sudoers.d/${USER} \
|
||||
&& usermod -s "$(which zsh)" ${USER}
|
||||
USER ${USER}
|
||||
WORKDIR /home/${USER}
|
||||
|
||||
RUN git clone https://aur.archlinux.org/yay.git
|
||||
WORKDIR /home/${USER}/yay
|
||||
RUN makepkg -si --noconfirm
|
||||
|
||||
WORKDIR /home/${USER}
|
||||
RUN rm -rf yay \
|
||||
&& sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
|
||||
&& git clone https://github.com/DefectingCat/dotfiles \
|
||||
&& chmod +x /home/${USER}/dotfiles/zsh/install.sh \
|
||||
&& cp -aR /home/${USER}/dotfiles/zsh/zshrc-linux /home/${USER}/.zshrc \
|
||||
&& ./home/${USER}/dotfiles/zsh/install.sh \
|
||||
&& git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1 \
|
||||
&& cp -aR /home/${USER}/dotfiles/nvim/lua/custom /home/${USER}/.config/nvim/lua/
|
||||
|
||||
ENTRYPOINT ["/bin/zsh"]
|
@ -124,4 +124,3 @@ fi
|
||||
|
||||
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
|
||||
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
|
||||
|
||||
|
Reference in New Issue
Block a user