-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile-runner
33 lines (25 loc) · 1.14 KB
/
Dockerfile-runner
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 debian:buster
ARG GH_ACTIONS_RUNNER_VERSION=2.286.0
ARG PACKAGES="docker-ce gnupg2 apt-transport-https ca-certificates software-properties-common pwgen git make curl wget zip libicu-dev build-essential libssl-dev"
# install basic stuff
RUN apt-get update \
&& apt-get install -y -q ${PACKAGES} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# install docker
RUN curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
&& chmod +x /usr/local/bin/docker-compose
# create "runner" user
RUN useradd -d /runner --uid=1000 runner \
&& echo 'runner:runner' | chpasswd \
&& mkdir /runner \
&& chown -R runner:runner /runner
USER runner
WORKDIR /runner
# install github actions runner
RUN curl -o actions-runner-linux-${ARCH}.tar.gz -L https://github.com/actions/runner/releases/download/v${GH_ACTIONS_RUNNER_VERSION}/actions-runner-linux-${ARCH}-${GH_ACTIONS_RUNNER_VERSION}.tar.gz \
&& tar xzf ./actions-runner-linux-${ARCH}.tar.gz \
&& rm -f actions-runner-linux-${ARCH}.tar.gz
COPY start.sh /
RUN chmod +x /start.ssh
CMD /start.sh