This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-bookworm
42 lines (32 loc) · 2.06 KB
/
Dockerfile-bookworm
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
# base
FROM debian:bookworm-slim
ARG RUNNER_ARCH
ARG RUNNER_VERSION
# update the base packages and add a non-sudo user
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Berlin"
RUN apt-get update -y && apt-get upgrade -y && useradd -m docker
# install additional packages as necessary
RUN apt-get install -y gosu curl jq ca-certificates gnupg lsb-release git
# install gh tool
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt-get update -y && apt-get install -y gh
# install docker
# https://docs.docker.com/engine/install/debian/
RUN apt-get install -y ca-certificates curl gnupg
RUN install -m 0755 -d /etc/apt/keyrings
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt-get update -y && apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# cd into the user directory, download and unzip the github actions runner
# amd64 is changed into x64 for the download
RUN DOWNLOAD_URL="https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-$(echo ${RUNNER_ARCH} | sed -e 's/amd64/x64/g')-${RUNNER_VERSION}.tar.gz" \
&& cd /home/docker && mkdir actions-runner && cd actions-runner \
&& curl -s -L ${DOWNLOAD_URL} | tar xz
# install some additional dependencies
RUN chown -R docker ~docker && /home/docker/actions-runner/bin/installdependencies.sh
# copy over the start.sh script, make it executable
COPY start.sh start.sh
RUN chmod +x start.sh
# set the entrypoint to the start.sh script
ENTRYPOINT ["./start.sh"]