Skip to content

Commit

Permalink
DLR-1716 Set --provenance=false for docker buildx >= v0.10 to avoid '…
Browse files Browse the repository at this point in the history
…docker manifest create' failures
  • Loading branch information
Dmitry Kozlov (Enterprise Products) committed Feb 14, 2024
1 parent 5e5ef25 commit 4dc3775
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sbin/docker_buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ docker_buildx::docker_buildx() {

docker buildx inspect --bootstrap

docker buildx build $in_BUILDX_ARGS .
local BUILDX_VERSION=$( docker buildx version | awk '{print $2}' | sed 's/[^0-9.]//g' )
local BUILDX_PROVENANCE_ARGS="--provenance=false"
if dpkg --compare-versions "${BUILDX_VERSION}" "lt" "0.10.0"; then
BUILDX_PROVENANCE_ARGS=""
fi

docker buildx build $BUILDX_PROVENANCE_ARGS $in_BUILDX_ARGS .
RV=$?
echo "exit code from the previous command -> $RV"
cleanup
return $RV
}

}

0 comments on commit 4dc3775

Please sign in to comment.