1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| FROM ubuntu:latest
ARG RUNNER_VERSION="2.309.0"
RUN apt-get update -y && apt-get upgrade -y && useradd -m docker &&\ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl libssl-dev python3 python3-pip\ && 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 \ && rm ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz\ && chown -R docker ~docker && /home/docker/actions-runner/bin/installdependencies.sh \ && apt remove curl libssl-dev python3 python3-pip -y \ && apt autoremove -y && apt clean\ && apt-get update && apt-get install -y sudo lsb-release && apt-get clean all \ && echo "docker ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers \ && sudo -u docker ./config.sh --url https://github.com/<YOUR_ORG_OR_REPO_HERE> --token <YOUR_TOKEN_HERE>
USER docker
WORKDIR /home/docker/actions-runner
COPY start.sh start.sh
CMD ["/home/docker/actions-runner/start.sh"]
|