mirror of
https://github.com/DefectingCat/dotfiles
synced 2025-07-15 16:51:36 +00:00
update github runner docker
This commit is contained in:
@ -1,28 +1,13 @@
|
||||
FROM archlinux
|
||||
FROM ubuntu
|
||||
|
||||
ARG USER=xfy
|
||||
ARG RUNNER_VERSION=2.311.0
|
||||
WORKDIR /runner
|
||||
RUN apt-get update \
|
||||
&& apt-get install curl libdigest-sha-perl dotnet-sdk-7.0 \
|
||||
aspnetcore-runtime-6.0 tmux build-essential -y \
|
||||
&& useradd --create-home xfy \
|
||||
&& mkdir actions-runner \
|
||||
&& chown -R xfy actions-runner
|
||||
|
||||
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
|
||||
|
||||
RUN chown -R "${USER}":"${USER}" /home/"${USER}"
|
||||
USER ${USER}
|
||||
COPY --chown=${USER} . /home/${USER}/dotfiles
|
||||
RUN export USER="${USER}" \
|
||||
&& chmod +x /home/${USER}/dotfiles/scripts/* \
|
||||
&& /home/${USER}/dotfiles/scripts/install-yay.sh
|
||||
|
||||
WORKDIR /home/${USER}/actions-runner
|
||||
RUN yay --noconfirm \
|
||||
yay -S curl \
|
||||
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
|
||||
USER xfy
|
||||
|
||||
ENTRYPOINT ["/usr/bin/bash"]
|
||||
|
@ -1,21 +0,0 @@
|
||||
FROM ubuntu
|
||||
|
||||
ARG USER=xfy
|
||||
ARG RUNNER_VERSION=2.311.0
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install curl sudo dotnet-sdk-6.0 -y
|
||||
|
||||
RUN useradd --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 /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 \
|
||||
&& rm -rf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz
|
||||
|
||||
ENTRYPOINT [ "/bin/bash" ]
|
1
dockerfiles/github-action/resume.sh
Normal file
1
dockerfiles/github-action/resume.sh
Normal file
@ -0,0 +1 @@
|
||||
docker run -d --name gymo-runner --restart unless-stopped -v ./runner/:/runner/ -it --entrypoint /runner/run.sh github-runner
|
1
dockerfiles/github-action/run.sh
Normal file
1
dockerfiles/github-action/run.sh
Normal file
@ -0,0 +1 @@
|
||||
docker run --name gymo-runner --restart unless-stopped -v ./runner/:/runner/ -it --entrypoint /bin/bash github-runner
|
Reference in New Issue
Block a user