mirror of
https://github.com/DefectingCat/dotfiles
synced 2025-07-15 16:51:36 +00:00
update coder arch-dev dockerfile
This commit is contained in:
36
dockerfiles/archlinux-coder/Dockerfile
Normal file
36
dockerfiles/archlinux-coder/Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
FROM archlinux
|
||||
|
||||
RUN echo '' > /etc/pacman.d/mirrorlist \
|
||||
&& echo 'Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist \
|
||||
&& pacman -Syyu --noconfirm \
|
||||
&& pacman-key --init \
|
||||
&& pacman-key --populate archlinux \
|
||||
&& pacman-key --refresh-keys \
|
||||
&& pacman -Syy --needed base-devel git zsh vim neovim fzf \
|
||||
ripgrep lazygit go ranger openssh pyenv \
|
||||
--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}
|
||||
WORKDIR /home/${USER}
|
||||
RUN rm -rf /home/${USER}/dotfiles \
|
||||
&& rm -rf /home/${USER}/yay
|
||||
|
||||
RUN chown -R "${USER}":"${USER}" /home/"${USER}"
|
||||
USER ${USER}
|
||||
RUN export USER="${USER}" \
|
||||
&& git clone https://github.com/DefectingCat/dotfiles \
|
||||
&& chmod +x /home/${USER}/dotfiles/scripts/* \
|
||||
&& /home/${USER}/dotfiles/scripts/install-yay.sh \
|
||||
&& /home/${USER}/dotfiles/scripts/install-archlinux.sh \
|
||||
&& yay --noconfirm
|
||||
|
||||
WORKDIR /home/${USER}/dotfiles
|
||||
RUN scripts/update.sh
|
||||
|
||||
WORKDIR /home/${USER}
|
||||
|
||||
ENTRYPOINT ["/bin/zsh"]
|
Reference in New Issue
Block a user