mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-01 03:16:22 +02:00
disable buildx.
This commit is contained in:
parent
c265e90ce4
commit
d92c482eff
1 changed files with 7 additions and 6 deletions
13
build
13
build
|
@ -2,12 +2,13 @@
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
# disable buildx because of https://github.com/docker/buildx/issues/847
|
||||||
|
USE_BUILDX=0
|
||||||
|
|
||||||
# check if docker buildx is available, its not docker-buildx command but rather subcommand of docker
|
# check if docker buildx is available, its not docker-buildx command but rather subcommand of docker
|
||||||
if [ -x "$(command -v docker)" ]; then
|
if [ -z "$USE_BUILDX" ] && [ -x "$(command -v docker)" ]; then
|
||||||
if docker buildx version >/dev/null 2>&1; then
|
if docker buildx version >/dev/null 2>&1; then
|
||||||
if [ -z "$USE_BUILDX" ]; then
|
USE_BUILDX=1
|
||||||
USE_BUILDX=1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -140,7 +141,7 @@ function build_image() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$USE_BUILDX" ] && [ "$USE_BUILDX" != "1" ]; then
|
if [ -z "$USE_BUILDX" ] || [ "$USE_BUILDX" != "1" ]; then
|
||||||
# if buildx is not available, use docker build
|
# if buildx is not available, use docker build
|
||||||
docker build \
|
docker build \
|
||||||
--platform $PLATFORM \
|
--platform $PLATFORM \
|
||||||
|
@ -187,7 +188,7 @@ function build_image() {
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
if [ -z "$USE_BUILDX" ] && [ "$USE_BUILDX" != "1" ]; then
|
if [ -z "$USE_BUILDX" ] || [ "$USE_BUILDX" != "1" ]; then
|
||||||
log "Using docker build"
|
log "Using docker build"
|
||||||
else
|
else
|
||||||
log "Using docker buildx"
|
log "Using docker buildx"
|
||||||
|
|
Loading…
Add table
Reference in a new issue