mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-15 16:38:23 +01:00
ci: use buildx in ci
Github-Pull: #32989 Rebased-From:94a0932547This rebase also includes part ofe87429a2d0adding `$DOCKER_BUILD_CACHE_ARG \` to the `docker build` command. Using buildx is required to properly load the correct driver, for use with registry caching. Neither build, nor BUILDKIT=1 currently do this properly. Use of `docker buildx build` is compatible with podman.
This commit is contained in:
@@ -17,11 +17,15 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
|||||||
docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append "/tmp/env-$USER-$CONTAINER_NAME"
|
docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append "/tmp/env-$USER-$CONTAINER_NAME"
|
||||||
echo "Creating $CI_IMAGE_NAME_TAG container to run in"
|
echo "Creating $CI_IMAGE_NAME_TAG container to run in"
|
||||||
|
|
||||||
DOCKER_BUILDKIT=1 docker build \
|
# Use buildx unconditionally
|
||||||
|
# Using buildx is required to properly load the correct driver, for use with registry caching. Neither build, nor BUILDKIT=1 currently do this properly
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
docker buildx build \
|
||||||
--file "${BASE_READ_ONLY_DIR}/ci/test_imagefile" \
|
--file "${BASE_READ_ONLY_DIR}/ci/test_imagefile" \
|
||||||
--build-arg "CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG}" \
|
--build-arg "CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG}" \
|
||||||
--build-arg "FILE_ENV=${FILE_ENV}" \
|
--build-arg "FILE_ENV=${FILE_ENV}" \
|
||||||
--label="${CI_IMAGE_LABEL}" \
|
--label="${CI_IMAGE_LABEL}" \
|
||||||
|
$DOCKER_BUILD_CACHE_ARG \
|
||||||
--tag="${CONTAINER_NAME}" \
|
--tag="${CONTAINER_NAME}" \
|
||||||
"${BASE_READ_ONLY_DIR}"
|
"${BASE_READ_ONLY_DIR}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user