mirror of
https://github.com/DefectingCat/dotfiles
synced 2025-07-15 16:51:36 +00:00
add github runner dockerfile
This commit is contained in:
@ -3,4 +3,5 @@ root = true
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM archlinux
|
||||
|
||||
RUN pacman -Syu --noconfirm \
|
||||
&& pacman -S --needed base-devel git zsh vim neovim fzf\
|
||||
# RUN pacman -Syu --noconfirm \
|
||||
RUN pacman -S --needed base-devel git zsh vim neovim fzf \
|
||||
ripgrep lazygit go ranger openssh pyenv \
|
||||
--noconfirm
|
||||
|
||||
@ -10,7 +10,7 @@ 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}
|
||||
WORKDIR /home/${USER}
|
||||
RUN rm -rf /home/${USER}/dotfiles \
|
||||
&& rm -rf /home/${USER}/yay
|
||||
|
||||
@ -25,6 +25,6 @@ RUN export USER="${USER}" \
|
||||
WORKDIR /home/${USER}/dotfiles
|
||||
RUN scripts/update.sh
|
||||
|
||||
WORKDIR /home/${USER}
|
||||
WORKDIR /home/${USER}
|
||||
|
||||
ENTRYPOINT ["/bin/zsh"]
|
||||
|
@ -3,11 +3,12 @@ FROM archlinux
|
||||
ARG USER=xfy
|
||||
ARG RUNNER_VERSION=2.311.0
|
||||
|
||||
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 pacman -Syu --noconfirm \
|
||||
&& pacman -S --needed git vim base-devel \
|
||||
--noconfirm
|
||||
|
||||
RUN useradd --groups wheel --no-create-home --shell /bin/bash ${USER}
|
||||
WORKDIR /home/${USER}
|
||||
RUN rm -rf /home/${USER}/dotfiles \
|
||||
&& rm -rf /home/${USER}/yay
|
||||
|
||||
@ -21,7 +22,7 @@ RUN export USER="${USER}" \
|
||||
WORKDIR /home/${USER}/actions-runner
|
||||
RUN yay --noconfirm \
|
||||
yay -S curl \
|
||||
curl -o actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
|
||||
curl -o actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
|
||||
-L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
|
||||
tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz
|
||||
|
||||
|
17
dockerfiles/github-action/Dockerfile.ubuntu
Normal file
17
dockerfiles/github-action/Dockerfile.ubuntu
Normal file
@ -0,0 +1,17 @@
|
||||
FROM ubuntu
|
||||
|
||||
ARG USER=xfy
|
||||
ARG RUNNER_VERSION=2.311.0
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install curl -y
|
||||
|
||||
RUN useradd --no-create-home --shell /bin/bash ${USER}
|
||||
WORKDIR /home/${USER}
|
||||
RUN rm -rf /home/${USER}/dotfiles
|
||||
|
||||
WORKDIR /home/${USER}/actions-runner
|
||||
RUN curl -o actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
|
||||
-L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
|
||||
&& tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz
|
Reference in New Issue
Block a user