Update buildx

This commit is contained in:
2022-06-14 20:42:16 +02:00
parent 690411a1ed
commit f0785ff961
+11 -12
View File
@@ -10,7 +10,7 @@ cd "${DIR}/.." || exit 1
# determine commit if not already set # determine commit if not already set
if [ "$BUILD_COMMIT" == "" ]; then if [ "$BUILD_COMMIT" == "" ]; then
BUILD_COMMIT=$(git log -n 1 --format=%h) BUILD_COMMIT=$(git log -n 1 --format=%h)
fi fi
# Buildx Builder # Buildx Builder
@@ -18,17 +18,16 @@ docker buildx create --name "${BUILDX_NAME:-npm}" || echo
docker buildx use "${BUILDX_NAME:-npm}" docker buildx use "${BUILDX_NAME:-npm}"
docker buildx build \ docker buildx build \
--build-arg BUILD_VERSION="${BUILD_VERSION:-dev}" \ --build-arg BUILD_VERSION="${BUILD_VERSION:-dev}" \
--build-arg BUILD_COMMIT="${BUILD_COMMIT:-notset}" \ --build-arg BUILD_COMMIT="${BUILD_COMMIT:-notset}" \
--build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \ --build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \
--build-arg GOPROXY="${GOPROXY:-}" \ --build-arg GOPROXY="${GOPROXY:-}" \
--build-arg GOPRIVATE="${GOPRIVATE:-}" \ --build-arg GOPRIVATE="${GOPRIVATE:-}" \
--platform linux/amd64,linux/arm64,linux/arm/7 \ --platform linux/amd64 \
--progress plain \ --progress plain \
--pull \ --pull \
-f docker/Dockerfile \ -f docker/Dockerfile \
$@ \ --output=type=docker,dest=- . > npm.tar
.
rc=$? rc=$?
docker buildx rm "${BUILDX_NAME:-npm}" docker buildx rm "${BUILDX_NAME:-npm}"