Skip to content

Instantly share code, notes, and snippets.

@kunxian-xia
Created October 30, 2024 09:39
Show Gist options
  • Save kunxian-xia/f7e1203362de5881dfecbc3c3645075e to your computer and use it in GitHub Desktop.
Save kunxian-xia/f7e1203362de5881dfecbc3c3645075e to your computer and use it in GitHub Desktop.
GitHub Actions Runner inside docker
FROM ubuntu:22.04
ARG RUNNER_VERSION="2.320.0"
ARG CHECKSUM="93ac1b7ce743ee85b5d386f5c1787385ef07b3d7c728ff66ce0d3813d5f46900"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y && apt upgrade -y && useradd -m docker
RUN apt install -y --no-install-recommends \
curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip \
libkrb5-3 zlib1g libicu70
RUN cd /home/docker && mkdir actions-runner && cd actions-runner \
&& 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-2.320.0.tar.gz \
&& echo "$CHECKSUM actions-runner-linux-x64-$RUNNER_VERSION.tar.gz" | shasum -a 256 -c \
&& tar xzf ./actions-runner-linux-x64-$RUNNER_VERSION.tar.gz
RUN chown -R docker ~docker && cd /home/docker/actions-runner/bin/ \
&& chmod +x installdependencies.sh \
&& ./installdependencies.sh
COPY start.sh start.sh
RUN chmod +x start.sh
USER docker
ENTRYPOINT ["./start.sh"]
#!/bin/bash
cd /home/docker/actions-runner/
echo "begin to configure"
./config.sh --url https://github.com/scroll-tech/ceno --token $TOKEN
./run.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment