代码拉取完成,页面将自动刷新
#!/bin/bash
echo "==========================================="
echo "Building KoalaWiki Docker Images with BuildKit Multi-platform"
echo "==========================================="
# Enable Docker Buildx with a new builder that supports multi-platform builds
docker buildx create --name multiplatform-builder --use
# Build and push backend images for multiple platforms at once
echo "Building and pushing backend images for multiple platforms..."
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki:latest \
-t crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki:amd64 \
-f src/KoalaWiki/Dockerfile \
--push .
if [ $? -ne 0 ]; then
echo "Error building and pushing backend images!"
exit 1
fi
# Build and push frontend images for multiple platforms at once
echo "Building and pushing frontend images for multiple platforms..."
pushd web > /dev/null
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki-web:latest \
-t crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki-web:amd64 \
-f Dockerfile \
--push .
if [ $? -ne 0 ]; then
echo "Error building and pushing frontend images!"
exit 1
fi
popd > /dev/null
# Clean up the builder
docker buildx rm multiplatform-builder
echo "==========================================="
echo "All images built and pushed successfully!"
echo "==========================================="
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。