mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-05-14 13:51:33 +00:00
* 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.
47 lines
1.3 KiB
Docker
47 lines
1.3 KiB
Docker
FROM ubuntu:22.04
|
|
|
|
LABEL author="Chris Lu"
|
|
|
|
# Use faster mirrors and optimize package installation
|
|
# Note: This e2e test image intentionally runs as root for simplicity and compatibility.
|
|
# Production images (Dockerfile.go_build) use proper user isolation with su-exec.
|
|
# For testing purposes, running as root avoids permission complexities and dependency
|
|
# on Alpine-specific tools like su-exec (not available in Ubuntu repos).
|
|
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 \
|
|
curl \
|
|
fio \
|
|
fuse \
|
|
ca-certificates \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& rm -rf /tmp/* \
|
|
&& rm -rf /var/tmp/*
|
|
RUN mkdir -p /etc/seaweedfs /data/filerldb2
|
|
|
|
COPY ./weed /usr/bin/
|
|
COPY ./filer.toml /etc/seaweedfs/filer.toml
|
|
COPY ./entrypoint_e2e.sh /entrypoint.sh
|
|
|
|
# volume server grpc port
|
|
EXPOSE 18080
|
|
# volume server http port
|
|
EXPOSE 8080
|
|
# filer server grpc port
|
|
EXPOSE 18888
|
|
# filer server http port
|
|
EXPOSE 8888
|
|
# master server shared grpc port
|
|
EXPOSE 19333
|
|
# master server shared http port
|
|
EXPOSE 9333
|
|
|
|
VOLUME /data
|
|
WORKDIR /data
|
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|