forked from myoung34/docker-github-actions-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.slim
29 lines (24 loc) · 1.06 KB
/
Dockerfile.slim
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
# syntax=docker/dockerfile:1
ARG BASE_IMAGE="derskythe/github-runner-base:latest"
FROM ${BASE_IMAGE} AS base
# hadolint ignore=DL3007
ARG GH_RUNNER_VERSION="2.320.0"
ARG RUNNER_DIR="/actions-runner"
ARG CACHE_HOSTED_TOOLS_DIRECTORY="${RUNNER_DIR}/hostedtoolcache"
ARG CHOWN_USER="runner"
ARG TARGETARCH
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV RUNNER_DIR=${RUNNER_DIR} \
NUGET_PACKAGES=${CACHE_HOSTED_TOOLS_DIRECTORY}/nuget-packages \
CACHE_HOSTED_TOOLS_DIRECTORY=${CACHE_HOSTED_TOOLS_DIRECTORY}
WORKDIR ${RUNNER_DIR}
COPY *.sh .
RUN mkdir -p ${NUGET_PACKAGES} /_work \
&& TARGET_ARCH=$(echo ${TARGETARCH} | sed 's/amd/x/') \
&& chmod +x entrypoint.sh \
&& wget -qO- "https://github.com/actions/runner/releases/download/v${GH_RUNNER_VERSION}/actions-runner-linux-$TARGET_ARCH-${GH_RUNNER_VERSION}.tar.gz" | tar xz \
&& ./bin/installdependencies.sh \
&& rm -Rf install_actions.sh ./externals/node12_alpine ./externals/node12 /var/lib/apt/lists/* /tmp/*
ENTRYPOINT ["./entrypoint.sh"]
CMD ["./bin/Runner.Listener", "run", "--startuptype", "service"]
#