Files
seaweedfs/test/pjdfstest/Dockerfile
Chris Lu 40ffc73aa8 ci(pjdfstest): cache docker layers via GHA to avoid apt mirror flakes (#9106)
* ci(pjdfstest): cache docker layers via GHA to avoid apt mirror flakes

Replace the local buildx cache + manual fallback with docker/setup-buildx-action
and docker/build-push-action using type=gha cache. The e2e and pjdfstest Dockerfile
layers now persist across runs in GitHub's own cache backend, so apt-get update
only hits Ubuntu mirrors when the Dockerfiles change. Also add Acquire::Retries
and Timeout so first-run cache-miss builds survive transient mirror sync errors.

* ci(pjdfstest): use local registry to share e2e image across buildx builds

The docker-container buildx driver cannot see images loaded into the host
Docker daemon, so the second build's FROM chrislusf/seaweedfs:e2e failed with
"not found" on registry-1.docker.io.

Run a local registry:2 on the runner, push both images to localhost:5000,
remap the FROM via build-contexts so the Dockerfile stays unchanged, then
tag the pulled images locally for docker compose to consume.
2026-04-16 12:50:19 -07:00

29 lines
845 B
Docker

FROM chrislusf/seaweedfs:e2e
RUN apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=30 update && \
DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=30 install -y \
--no-install-recommends \
--no-install-suggests \
autoconf \
automake \
build-essential \
git \
libtap-harness-archive-perl \
perl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ARG PJDFSTEST_REPO=https://github.com/sanwan/pjdfstest.git
ARG PJDFSTEST_REF=d25636a227606f8960e5179741d8f4ad7030ef41
RUN git clone "${PJDFSTEST_REPO}" /opt/pjdfstest && \
cd /opt/pjdfstest && \
git checkout "${PJDFSTEST_REF}" && \
autoreconf -ifs && \
./configure && \
make pjdfstest
COPY run_inside_container.sh /run.sh
COPY known_failures.txt /known_failures.txt
RUN chmod +x /run.sh