mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-31 10:41:08 +00:00
ci: use buildx in ci
Github-Pull: #32989 Rebased-From: 94a09325475 This rebase also includes part of e87429a2d0f23eb59526d335844fa5ff5b50b21f adding `$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:
parent
f8cb31d064
commit
f6ccd895df
@ -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"
|
||||
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" \
|
||||
--build-arg "CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG}" \
|
||||
--build-arg "FILE_ENV=${FILE_ENV}" \
|
||||
--label="${CI_IMAGE_LABEL}" \
|
||||
$DOCKER_BUILD_CACHE_ARG \
|
||||
--tag="${CONTAINER_NAME}" \
|
||||
"${BASE_READ_ONLY_DIR}"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user