Files
github-runner/Dockerfile
2025-10-14 11:09:08 +02:00

25 lines
626 B
Docker

FROM ubuntu:22.04
RUN apt-get update && apt-get install -y curl jq git sudo
# Create a non-root user runneruser
RUN useradd -m runneruser && echo "runneruser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN mkdir -p /actions-runner
WORKDIR /actions-runner
COPY actions-runner.tar.gz actions-runner.tar.gz
RUN tar xzf ./actions-runner.tar.gz
RUN ./bin/installdependencies.sh
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Change ownership of the runner directory to the non-root user
RUN chown -R runneruser:runneruser /actions-runner
# Switch to non-root user
USER runneruser
ENTRYPOINT ["/entrypoint.sh"]