mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
A transient Debian/Ubuntu mirror fetch aborts a docker build layer with exit 100 (it killed the web-app-nextcloud swarm openldap build while the same image built fine elsewhere). New lint under tests/lint/docker/dockerfile/apt/ flags any RUN with apt-get update/install that omits Acquire::Retries; retrofit all 15 apt Dockerfiles with -o Acquire::Retries=3. Both apt lints move into the apt/ subpackage. dnf retries by default and apk has no equivalent flag, so both stay out of scope. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.5 KiB
Docker
45 lines
1.5 KiB
Docker
ARG RUNNER_BASE_IMAGE
|
|
FROM ${RUNNER_BASE_IMAGE}
|
|
|
|
ARG RUNNER_UID
|
|
ARG RUNNER_GID
|
|
|
|
RUN rm -rf /var/lib/apt/lists/* \
|
|
&& apt-get -o Acquire::Retries=3 update \
|
|
&& apt-get -o Acquire::Retries=3 install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
git \
|
|
gnupg \
|
|
jq \
|
|
libicu-dev \
|
|
libssl-dev \
|
|
gettext-base \
|
|
make \
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
sudo \
|
|
tar \
|
|
&& curl --connect-timeout 5 --max-time 60 -fsSL https://download.docker.com/linux/ubuntu/gpg \
|
|
| gpg --dearmor -o /usr/share/keyrings/docker.gpg \
|
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] \
|
|
https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
|
|
> /etc/apt/sources.list.d/docker.list \
|
|
&& apt-get -o Acquire::Retries=3 update \
|
|
&& apt-get -o Acquire::Retries=3 install -y --no-install-recommends docker-ce-cli docker-compose-plugin \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& ln -sf python3 /usr/bin/python
|
|
|
|
RUN groupadd -g "${RUNNER_GID}" github-runner \
|
|
&& useradd -u "${RUNNER_UID}" -g "${RUNNER_GID}" -m -s /bin/bash github-runner \
|
|
&& echo "github-runner ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/github-runner \
|
|
&& chmod 0440 /etc/sudoers.d/github-runner
|
|
|
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
|
|
WORKDIR /runner
|
|
USER github-runner
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|