A container definition for running the Github Actions agent. The agent is installed in the entrypoint so that it always runs the most up to date version, without having to build a new docker container.
Note: This build method requires the buildx docker plugin. See this link for more details...
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t mathewfleisch/github-actions-runner:myversion .
See this repo for information about the base container.
# From Linux
docker run -it --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
--group-add $(stat -c '%g' /var/run/docker.sock) \
-e GIT_PAT="$GIT_TOKEN" \
-e GIT_OWNER="mathew-fleisch" \
-e GIT_REPO="github-actions-runner" \
-e LABELS="gha-runner" \
--name "gha-runner" \
mathewfleisch/github-actions-runner:v0.1.0
# From Mac
docker run -it --rm \
-v /var/run/docker.sock:/var/rund/docker.sock \
-e GIT_PAT="$GIT_TOKEN" \
-e GIT_OWNER="mathew-fleisch" \
-e GIT_REPO="github-actions-runner" \
-e LABELS="gha-runner" \
--name "gha-runner" \
mathewfleisch/github-actions-runner:v0.1.0