forked from nwestfall/lambda-github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
60 lines (52 loc) · 1.77 KB
/
Copy pathDockerfile.base
File metadata and controls
60 lines (52 loc) · 1.77 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM debian:buster-slim
ARG DEBIAN_FRONTEND=noninteractive
ARG GIT_VERSION="2.26.2"
ARG GH_RUNNER_VERSION
ARG DOCKER_COMPOSE_VERSION="1.27.4"
ENV RUNNER_NAME=""
ENV RUNNER_WORK_DIRECTORY="_work"
ENV RUNNER_TOKEN=""
ENV RUNNER_REPOSITORY_URL=""
ENV RUNNER_LABELS=""
ENV RUNNER_ALLOW_RUNASROOT=true
ENV GITHUB_ACCESS_TOKEN=""
ENV AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y \
curl \
unzip \
apt-transport-https \
ca-certificates \
software-properties-common \
sudo \
supervisor \
jq \
iputils-ping \
build-essential \
zlib1g-dev \
gettext \
liblttng-ust0 \
libcurl4-openssl-dev \
openssh-client && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
RUN cd /tmp && \
curl -sL -o git.tgz \
https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz && \
tar zxf git.tgz && \
cd git-${GIT_VERSION} && \
./configure --prefix=/usr && \
make && \
make install && \
rm -rf /tmp/*
RUN mkdir -p /runner ${AGENT_TOOLSDIRECTORY}
WORKDIR /runner
RUN GH_RUNNER_VERSION=${GH_RUNNER_VERSION:-$(curl --silent "https://api.github.com/repos/actions/runner/releases/latest" | grep tag_name | sed -E 's/.*"v([^"]+)".*/\1/')} \
&& curl -L -O https://github.com/actions/runner/releases/download/v${GH_RUNNER_VERSION}/actions-runner-linux-x64-${GH_RUNNER_VERSION}.tar.gz \
&& tar -zxf actions-runner-linux-x64-${GH_RUNNER_VERSION}.tar.gz \
&& rm -f actions-runner-linux-x64-${GH_RUNNER_VERSION}.tar.gz \
&& ./bin/installdependencies.sh \
&& chown -R root: /runner \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
ENV RUNNER_TOOL_CACHE="/tmp/toolcache"