Skip to content

Commit 4dc3775

Browse files
author
Dmitry Kozlov (Enterprise Products)
committed
DLR-1716 Set --provenance=false for docker buildx >= v0.10 to avoid 'docker manifest create' failures
1 parent 5e5ef25 commit 4dc3775

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

sbin/docker_buildx.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ docker_buildx::docker_buildx() {
5757

5858
docker buildx inspect --bootstrap
5959

60-
docker buildx build $in_BUILDX_ARGS .
60+
local BUILDX_VERSION=$( docker buildx version | awk '{print $2}' | sed 's/[^0-9.]//g' )
61+
local BUILDX_PROVENANCE_ARGS="--provenance=false"
62+
if dpkg --compare-versions "${BUILDX_VERSION}" "lt" "0.10.0"; then
63+
BUILDX_PROVENANCE_ARGS=""
64+
fi
65+
66+
docker buildx build $BUILDX_PROVENANCE_ARGS $in_BUILDX_ARGS .
6167
RV=$?
6268
echo "exit code from the previous command -> $RV"
6369
cleanup
6470
return $RV
65-
}
66-
71+
}

0 commit comments

Comments
 (0)