-
docker-github-runner-linux
Repository for building a self hosted GitHub runner as a ubuntu linux container
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
docker-github-runner-windows
Repository for building a self hosted GitHub runner as a windows container
-
Puts Debuggerer
Ruby library for improved puts debugging, automatically displaying bonus useful information such as source line number and source code.
Open VSCode, you can clone the repo found on my GitHub project docker-github-runner-linux which contains all the files or simply follow along with the following steps. We will prepare a script that will be needed as part of our docker image creation.
# base image FROM ubuntu:20.04 #input GitHub runner version argument ARG RUNNER_VERSION ENV DEBIAN_FRONTEND=noninteractive LABEL Author="Marcel L" LABEL Email="[email protected]" LABEL GitHub="https://github.com/Pwd9000-ML" LABEL BaseImage="ubuntu:20.04" LABEL RunnerVersion=${RUNNER_VERSION} # update the base packages + add a non-sudo user RUN apt-get update -y && apt-get upgrade -y && useradd -m docker # install the packages and dependencies along with jq so we can parse JSON (add additional packages as necessary) RUN apt-get install -y --no-install-recommends \ curl nodejs wget unzip vim git azure-cli jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip # cd into the user directory, download and unzip the github actions runner RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ && curl -O -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 # install some additional dependencies RUN chown -R docker ~docker && /home/docker/actions-runner/bin/installdependencies.sh # add over the start.sh script ADD scripts/start.sh start.sh # make the script executable RUN chmod +x start.sh # set the user to "docker" so all subsequent commands are run as the docker user USER docker # set the entrypoint to the start.sh script ENTRYPOINT ["./start.sh"]
You can use this test workflow from my GitHub project: docker-github-runner-linux.
# base image FROM ubuntu:20.04 #input GitHub runner version argument ARG RUNNER_VERSION ENV DEBIAN_FRONTEND=noninteractive LABEL Author="Marcel L" LABEL Email="[email protected]" LABEL GitHub="https://github.com/Pwd9000-ML" LABEL BaseImage="ubuntu:20.04" LABEL RunnerVersion=${RUNNER_VERSION} # update the base packages + add a non-sudo user RUN apt-get update -y && apt-get upgrade -y && useradd -m docker # install the packages and dependencies along with jq so we can parse JSON (add additional packages as necessary) RUN apt-get install -y --no-install-recommends \ curl nodejs wget unzip vim git azure-cli jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip # cd into the user directory, download and unzip the github actions runner RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ && curl -O -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 # install some additional dependencies RUN chown -R docker ~docker && /home/docker/actions-runner/bin/installdependencies.sh # add over the start.sh script ADD scripts/start.sh start.sh # make the script executable RUN chmod +x start.sh # set the user to "docker" so all subsequent commands are run as the docker user USER docker # set the entrypoint to the start.sh script ENTRYPOINT ["./start.sh"]