gitea-runner (debian)
Installation
docker pull git.shihaam.dev/dockerfiles/gitea-runner:debian
sha256:a469b0811306682aa706e1b6de677c9fea93d2c4ebb014e231af27930d1a325e
About this package
Docker image based on debian:stable-slim to run Gitea's act_runner as a Docker container
Image Layers
# debian.sh --arch 'amd64' out/ 'stable' '@1751241600' |
ARG DEBIAN_FRONTEND=noninteractive |
ARG LC_ALL=C |
SHELL [/bin/bash -euo pipefail -c] |
ARG INSTALL_SUPPORT_TOOLS=0 |
ARG BASE_LAYER_CACHE_KEY=20250709 |
ARG UPX_COMPRESS=true |
ARG FLAVOR=dood |
ARG GITEA_ACT_RUNNER_VERSION=0.2.12 |
RUN |7 DEBIAN_FRONTEND=noninteractive LC_ALL=C INSTALL_SUPPORT_TOOLS=0 BASE_LAYER_CACHE_KEY=20250709 UPX_COMPRESS=true FLAVOR=dood GITEA_ACT_RUNNER_VERSION=0.2.12 /bin/bash -euo pipefail -c /mnt/shared/cmd/debian-install-os-updates.sh /mnt/shared/cmd/debian-install-support-tools.sh function minimize() { ls -l "$@" echo "Stripping [$*]..." command strip --strip-unneeded "$@" ls -l "$@" if [[ $UPX_COMPRESS == "true" ]]; then echo "Compressing [$*]..." /opt/upx/upx -9 "$@" || true fi } function curl() { command curl -sSfL --connect-timeout 10 --max-time 30 --retry 3 --retry-all-errors "$@" } arch=$(dpkg --print-architecture) case "$arch" in armhf) upx_arch=arm; gitea_arch=arm-7 ;; amd64|arm64) upx_arch=$arch; gitea_arch=$arch ;; *) echo "Unsupported arch: $arch"; exit 1;; esac echo "#################################################" echo "Installing required packages..." echo "#################################################" apt-get install --no-install-recommends -y binutils ca-certificates curl sudo tini if [[ $UPX_COMPRESS == "true" ]]; then echo "#################################################" echo "Downloading UPX..." echo "#################################################" apt-get install --no-install-recommends -y xz-utils mkdir /opt/upx # https://api.github.com/repos/upx/upx/releases/latest -> points to 5.0.1 which crashes with "3972 Segmentation fault (core dumped) docker --version" # https://api.github.com/repos/upx/upx/releases/154915740 -> points to 4.2.4 upx_download_url=$(curl "https://api.github.com/repos/upx/upx/releases/154915740" | grep browser_download_url | grep "${upx_arch}_linux.tar.xz" | cut "-d\"" -f4) echo "Downloading [$upx_download_url]..." curl "$upx_download_url" | tar Jxv -C /opt/upx --strip-components=1 /opt/upx/upx --version fi minimize /usr/bin/tini-static echo "#################################################" echo "Downloading Gitea act runner..." echo "#################################################" if [[ $GITEA_ACT_RUNNER_VERSION == "nightly" ]]; then act_runner_download_url="https://dl.gitea.com/act_runner/nightly/act_runner-${GITEA_ACT_RUNNER_VERSION}-linux-${gitea_arch}" else act_runner_download_url="https://gitea.com/gitea/act_runner/releases/download/v${GITEA_ACT_RUNNER_VERSION}/act_runner-${GITEA_ACT_RUNNER_VERSION}-linux-${gitea_arch}" fi echo "Downloading [$act_runner_download_url]..." curl "$act_runner_download_url" -o /usr/local/bin/act_runner chmod 755 /usr/local/bin/act_runner minimize /usr/local/bin/act_runner act_runner --version echo "#################################################" echo "Adding [act] user..." echo "#################################################" addgroup --gid 1000 act adduser --uid 1000 --ingroup act --home /data --shell /bin/bash --disabled-password --gecos "" act adduser act users adduser act sudo echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers if [[ $FLAVOR == dind* ]]; then echo "#################################################" echo "Installing docker engine..." echo "#################################################" # git needed by buildx apt-get install --no-install-recommends -y git # https://docs.docker.com/engine/install/debian/#install-using-the-repository apt-get install --no-install-recommends -y gnupg install -m 0755 -d /etc/apt/keyrings curl "https://download.docker.com/linux/debian/gpg" | gpg --dearmor -o /etc/apt/keyrings/docker.gpg chmod a+r /etc/apt/keyrings/docker.gpg ARCH="$(dpkg --print-architecture)" # shellcheck disable=SC1091 # Not following: File not included in mock OS_CODENAME="$(source /etc/os-release && echo "$VERSION_CODENAME")" echo "deb [arch=$ARCH signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $OS_CODENAME stable" > /etc/apt/sources.list.d/docker.list apt-get update (set -x; apt-get install --no-install-recommends -y docker-ce containerd.io fuse-overlayfs) apt-get remove -y gnupg apt-get autoremove -y minimize /usr/bin/containerd* /usr/bin/ctr /usr/bin/docker* /usr/bin/runc docker --version runc --version # https://github.com/docker/for-linux/issues/1437#issuecomment-1293818806 update-alternatives --set iptables /usr/sbin/iptables-legacy update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy # set up subuid/subgid so that "--userns-remap=default" works out-of-the-box addgroup --system dockremap adduser --system --ingroup dockremap dockremap echo 'dockremap:165536:65536' | tee -a /etc/subuid echo 'dockremap:165536:65536' | tee -a /etc/subgid if [[ $FLAVOR == dind-rootless ]]; then # https://docs.docker.com/engine/security/rootless/ (set -x; apt-get install --no-install-recommends -y \ dbus-user-session \ `# docker-ce-rootless-extras` \ kmod \ iproute2 \ slirp4netns \ uidmap) # workaround for "[rootlesskit:parent] error: failed to start the child: fork/exec /proc/self/exe: operation not permitted" # see https://github.com/rootless-containers/rootlesskit/issues/425 (set -x; apt-get install --no-install-recommends -y docker-ce-rootless-extras=5:25.0.3-1~debian.12~bookworm --allow-downgrades) (set -x; rootlesskit --version) (set -x; runuser -u act -g act -- /usr/bin/dockerd-rootless-setuptool.sh install --skip-iptables) # workaround "failed to load plugin io.containerd.internal.v1.opt error="mkdir /opt/containerd: permission denied" mkdir /opt/containerd chown act:act /opt/containerd else docker_version=$(docker --version | cut -d ' ' -f3 | cut -d ',' -f1) curl "https://raw.githubusercontent.com/moby/moby/v${docker_version}/hack/dind" -o /usr/local/bin/dind-hack chmod +x /usr/local/bin/dind-hack usermod -aG docker act fi fi echo "#################################################" echo "Cleanup..." echo "#################################################" apt-get remove -y binutils curl rm -rf /opt/upx /mnt/shared/cmd/debian-cleanup.sh # buildkit |
ENV INIT_SH_FILE= GITEA_RUNNER_CONFIG_TEMPLATE_FILE=/opt/config.template.yaml GITEA_RUNNER_NAME= GITEA_RUNNER_LABELS= GITEA_RUNNER_LABELS_DEFAULT=ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest,ubuntu-24.04:docker://ghcr.io/catthehacker/ubuntu:act-24.04,ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04,ubuntu-20.04:docker://ghcr.io/catthehacker/ubuntu:act-20.04 GITEA_RUNNER_UID=1000 GITEA_RUNNER_GID=1000 GITEA_RUNNER_REGISTRATION_TIMEOUT=30 GITEA_RUNNER_REGISTRATION_RETRY_INTERVAL=5s |
ARG OCI_authors=Vegard IT GmbH (vegardit.com) |
ARG OCI_title=vegardit/gitea-act-runner |
ARG OCI_description=Docker image based on debian:stable-slim to run Gitea's act_runner as a Docker container |
ARG OCI_source=https://github.com/vegardit/docker-gitea-act-runner |
ARG OCI_revision=d4d138e |
ARG OCI_version=d4d138e |
ARG OCI_created=2025-07-09T17:17:28Z |
ARG GIT_BRANCH=main |
ARG GIT_COMMIT_DATE=2025-06-05 14:00:44 UTC |
LABEL org.opencontainers.image.title=vegardit/gitea-act-runner org.opencontainers.image.description=Docker image based on debian:stable-slim to run Gitea's act_runner as a Docker container org.opencontainers.image.source=https://github.com/vegardit/docker-gitea-act-runner org.opencontainers.image.revision=d4d138e org.opencontainers.image.version=d4d138e org.opencontainers.image.created=2025-07-09T17:17:28Z |
LABEL maintainer=Vegard IT GmbH (vegardit.com) |
RUN |16 DEBIAN_FRONTEND=noninteractive LC_ALL=C INSTALL_SUPPORT_TOOLS=0 BASE_LAYER_CACHE_KEY=20250709 UPX_COMPRESS=true FLAVOR=dood GITEA_ACT_RUNNER_VERSION=0.2.12 OCI_authors=Vegard IT GmbH (vegardit.com) OCI_title=vegardit/gitea-act-runner OCI_description=Docker image based on debian:stable-slim to run Gitea's act_runner as a Docker container OCI_source=https://github.com/vegardit/docker-gitea-act-runner OCI_revision=d4d138e OCI_version=d4d138e OCI_created=2025-07-09T17:17:28Z GIT_BRANCH=main GIT_COMMIT_DATE=2025-06-05 14:00:44 UTC /bin/bash -euo pipefail -c echo "#################################################" echo "Writing build_info..." echo "#################################################" cat <<EOT >/opt/build_info GIT_REPO: $OCI_source GIT_BRANCH: $GIT_BRANCH GIT_COMMIT: $OCI_revision @ $GIT_COMMIT_DATE IMAGE_BUILD: $OCI_created EOT cat /opt/build_info # buildkit |
COPY image/*.sh /opt/ # buildkit |
COPY image/config.template.yaml /opt/ # buildkit |
COPY .shared/lib/bash-init.sh /opt/bash-init.sh # buildkit |
USER act |
VOLUME [/data] |
VOLUME [/var/lib/docker] |
ENTRYPOINT ["/usr/bin/tini" "--"] |
CMD ["/bin/bash" "/opt/run.sh"] |
RUN /bin/bash -euo pipefail -c sudo apt-get update && sudo apt-get install -y ca-certificates curl gnupg openssh-client # buildkit |
RUN /bin/bash -euo pipefail -c sudo install -m 0755 -d /etc/apt/keyrings && sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && sudo chmod a+r /etc/apt/keyrings/docker.asc && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && sudo apt-get update && sudo apt-get -y install docker-ce && sudo rm -v /usr/bin/dockerd-rootless.sh # buildkit |
Labels
Key | Value |
---|---|
maintainer | Vegard IT GmbH (vegardit.com) |
org.opencontainers.image.created | 2025-07-09T17:17:28Z |
org.opencontainers.image.description | Docker image based on debian:stable-slim to run Gitea's act_runner as a Docker container |
org.opencontainers.image.revision | d4d138e |
org.opencontainers.image.source | https://github.com/vegardit/docker-gitea-act-runner |
org.opencontainers.image.title | vegardit/gitea-act-runner |
org.opencontainers.image.version | d4d138e |
Details
2025-07-11 21:21:50 +00:00
Versions (2)
View all
Container
3
OCI / Docker
linux/amd64
254 MiB