bdcontract-bundle/docker/buildClusterDocker.sh
CaiHQ 053c97310a update join info
support joinCount function
2021-12-17 12:54:02 +08:00

22 lines
732 B
Bash
Executable File

#!/bin/bash
DOCKER_CLI_EXPERIMENTAL=enabled
cp ./docker/ClusterDockerfile ./router-backend/build/Dockerfile
cd ./router-backend/build
if [ $# -lt 1 ]; then
echo "missing arguments,\nusage: \$version [-,push,save] \$saveDir"
exit 1
fi
#linux/arm64/v8,
if [ "$2" == "push" ]; then
docker buildx build --platform linux/amd64,linux/arm64/v8 -t bdware/bdcluster:$1 ./ --push
elif [ "$2" == "save" ]; then
docker buildx build --platform linux/amd64 -t bdware/bdcluster:$1 ./ --load
docker save -o $3/bdcluster-$1.tar bdware/bdcluster:$1
else
# docker buildx build --platform linux/arm64/v8 -t bdware/bdcluster:$1 ./ --load
docker build -t bdware/bdcluster:$1 ./
docker tag bdware/bdcluster:$1 bdware/bdcluster:latest
fi