1
0
Fork 0
mirror of https://github.com/Luzifer/archrepo.git synced 2024-12-20 13:11:17 +00:00

When present use host-system mirrorlist for more speed

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-08-30 19:37:03 +02:00
parent c1c14b6b0b
commit 4d9a4d4a50
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -32,11 +32,18 @@ step "Re-fetching Docker image"
docker pull git.luzifer.io/registry/arch-repo-builder
step "Building package $(basename ${REPO})"
extra_opts=()
if [[ -f /etc/pacman.d/mirrorlist ]]; then
info "Using host system mirrorlist..."
extra_opts+=(-v "/etc/pacman.d/mirrorlist:/etc/pacman.d/mirrorlist:ro")
fi
docker run --rm -ti \
-v "${TMPDIR}/src:/src" \
-v "${TMPDIR}/cfg:/config" \
-v "${REPO_DIR}:/repo" \
-v "$(pwd)/scripts/pacman.conf:/etc/pacman.conf:ro" \
"${extra_opts[@]}" \
--ulimit nofile=262144:262144 \
git.luzifer.io/registry/arch-repo-builder \
"${REPO}"