-
Notifications
You must be signed in to change notification settings - Fork 270
/
Dockerfile
33 lines (25 loc) · 1.09 KB
/
Dockerfile
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
31
32
33
FROM registry.access.redhat.com/ubi8/ubi:latest
ARG GITHUB_RUNNER_VERSION="2.276.0"
LABEL summary="Supports running a GitHub self-hosted runner." \
description="Self-hosted GitHub runner" \
io.k8s.display-name="GitHub Runner" \
io.openshift.expose-services="" \
io.openshift.tags="rhel8,cicd"
RUN dnf update -y && \
dnf install -y git hostname && \
export JQ_VERSION=1.6 && \
curl -s -Lo /tmp/jq-linux64 https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 && \
chmod +x /tmp/jq-linux64 && \
ln -s /tmp/jq-linux64 /usr/local/bin/jq && \
jq --version && \
useradd -m github -u 1001
WORKDIR /home/github
RUN curl -Ls https://github.com/actions/runner/releases/download/v${GITHUB_RUNNER_VERSION}/actions-runner-linux-x64-${GITHUB_RUNNER_VERSION}.tar.gz | tar xzvC /home/github \
&& /home/github/bin/installdependencies.sh && \
dnf clean all
COPY entrypoint.sh ./entrypoint.sh
RUN chmod u+x ./entrypoint.sh && \
chmod -R g=u /home/github && \
chown -R 1001:0 /home/github
ENTRYPOINT ["/home/github/entrypoint.sh"]
USER 1001