@@ -13,53 +13,84 @@ docker buildx build \
1313 --platform linux/amd64 \
1414 -t crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki \
1515 -f src/KoalaWiki/Dockerfile \
16- --push .
16+ --load .
1717if [ $? -ne 0 ]; then
1818 echo " Error building backend amd64 image!"
1919 exit 1
2020fi
2121
22+ # Push backend amd64 image
23+ echo " Pushing backend amd64 image..."
24+ docker push crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki
25+ if [ $? -ne 0 ]; then
26+ echo " Error pushing backend amd64 image!"
27+ exit 1
28+ fi
29+
2230# Build backend image specifically for arm64 platform using Dockerfile.arm
2331echo " Building backend image for arm64 platform using Dockerfile.arm..."
2432docker buildx build \
2533 --platform linux/arm64 \
2634 -t crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki:arm64 \
2735 -f src/KoalaWiki/Dockerfile.arm \
28- --push .
36+ --load .
2937if [ $? -ne 0 ]; then
3038 echo " Error building backend arm64 image!"
3139 exit 1
3240fi
3341
42+ # Push backend arm64 image
43+ echo " Pushing backend arm64 image..."
44+ docker push crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki:arm64
45+ if [ $? -ne 0 ]; then
46+ echo " Error pushing backend arm64 image!"
47+ exit 1
48+ fi
49+
3450# Build frontend image for amd64 platform
3551echo " Building frontend image for amd64 platform..."
3652pushd web > /dev/null
3753docker buildx build \
3854 --platform linux/amd64 \
3955 -t crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki-web \
4056 -f Dockerfile \
41- --push .
57+ --load .
4258if [ $? -ne 0 ]; then
4359 echo " Error building frontend amd64 image!"
4460 exit 1
4561fi
62+
63+ # Push frontend amd64 image
64+ echo " Pushing frontend amd64 image..."
65+ docker push crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki-web
66+ if [ $? -ne 0 ]; then
67+ echo " Error pushing frontend amd64 image!"
68+ exit 1
69+ fi
4670popd > /dev/null
4771
4872# Build frontend image for arm64 platform
49- # Note: This assumes frontend might also need special handling for arm64
5073echo " Building frontend image for arm64 platform..."
5174pushd web > /dev/null
5275docker buildx build \
5376 --platform linux/arm64 \
5477 -t crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki-web:arm64 \
5578 -f Dockerfile.arm \
56- --push .
79+ --load .
5780if [ $? -ne 0 ]; then
5881 echo " Error building frontend arm64 image!"
5982 exit 1
6083fi
84+
85+ # Push frontend arm64 image
86+ echo " Pushing frontend arm64 image..."
87+ docker push crpi-j9ha7sxwhatgtvj4.cn-shenzhen.personal.cr.aliyuncs.com/koala-ai/koala-wiki-web:arm64
88+ if [ $? -ne 0 ]; then
89+ echo " Error pushing frontend arm64 image!"
90+ exit 1
91+ fi
6192popd > /dev/null
6293
6394echo " ==========================================="
6495echo " Images built and pushed successfully!"
65- echo " ==========================================="
96+ echo " ==========================================="
0 commit comments