mirror of
https://github.com/DefectingCat/dotfiles
synced 2025-07-15 00:31:35 +00:00
update dockerfiles
This commit is contained in:
@ -12,7 +12,7 @@ RUN echo '' > /etc/pacman.d/mirrorlist \
|
||||
|
||||
ARG USER=xfy
|
||||
RUN useradd --groups wheel --no-create-home --shell /bin/zsh ${USER} \
|
||||
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${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}
|
||||
@ -28,9 +28,6 @@ RUN export USER="${USER}" \
|
||||
&& /home/${USER}/dotfiles/scripts/install-archlinux.sh \
|
||||
&& yay --noconfirm
|
||||
|
||||
WORKDIR /home/${USER}/dotfiles
|
||||
RUN scripts/update.sh
|
||||
|
||||
WORKDIR /home/${USER}
|
||||
|
||||
ENTRYPOINT ["/bin/zsh"]
|
||||
|
@ -1,9 +1,5 @@
|
||||
FROM archlinux
|
||||
|
||||
# RUN pacman -Sy --needed base-devel git zsh vim neovim fzf \
|
||||
# ripgrep lazygit go ranger openssh pyenv \
|
||||
# --noconfirm
|
||||
|
||||
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 \
|
||||
@ -16,7 +12,7 @@ RUN echo '' > /etc/pacman.d/mirrorlist \
|
||||
|
||||
ARG USER=xfy
|
||||
RUN useradd --groups wheel --no-create-home --shell /bin/zsh ${USER} \
|
||||
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${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}
|
||||
@ -32,9 +28,6 @@ RUN export USER="${USER}" \
|
||||
&& /home/${USER}/dotfiles/scripts/install-archlinux.sh \
|
||||
&& yay --noconfirm
|
||||
|
||||
WORKDIR /home/${USER}/dotfiles
|
||||
RUN scripts/update.sh
|
||||
|
||||
WORKDIR /home/${USER}
|
||||
|
||||
ENTRYPOINT ["/bin/zsh"]
|
||||
|
1
dockerfiles/debian/Dockerfile
Normal file
1
dockerfiles/debian/Dockerfile
Normal file
@ -0,0 +1 @@
|
||||
FROM debian
|
18
dockerfiles/ubuntu/Dockerfile
Normal file
18
dockerfiles/ubuntu/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM ubuntu:noble
|
||||
|
||||
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& sed -i 's@//.*security.ubuntu.com@//mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& apt-get update -y \
|
||||
&& apt-get install -y git ninja-build gettext cmake unzip curl build-essential sudo \
|
||||
&& cd /opt && git clone --depth 1 https://gitee.com/mirrors/neovim && cd neovim \
|
||||
&& make CMAKE_BUILD_TYPE=Release \
|
||||
&& make install \
|
||||
&& rm -rf neovim \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG USER=xfy
|
||||
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
|
||||
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
|
||||
&& chmod 0440 /etc/sudoers.d/${USER}
|
||||
USER ${USER}
|
||||
WORKDIR /home/${USER}
|
@ -22,5 +22,4 @@ echo "install rustup done"
|
||||
|
||||
chmod +x /home/"$USER"/dotfiles/scripts/update.sh
|
||||
cd /home/"$USER"/dotfiles/ || exit
|
||||
./scripts/update.sh
|
||||
echo "install all done"
|
||||
|
Reference in New Issue
Block a user