update dockerfiles

This commit is contained in:
xfy
2024-06-04 17:10:59 +08:00
parent 7e59c62f9e
commit 90b604031c
5 changed files with 21 additions and 13 deletions

View File

@ -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"]

View File

@ -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 \
@ -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"]

View File

@ -0,0 +1 @@
FROM debian

View 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}

View File

@ -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"