mirror of
https://github.com/Weasley-J/chinaport-data-signature.git
synced 2026-10-19 16:15:47 +00:00
chore(webapp): 删除旧版docker推送脚本并添加多架构构建脚本
删除单架构docker推送脚本(docker-push-arm64.sh和docker-push-x86_64.sh),新增支持多平台构建推送的docker_build_and_push_multiarch.sh脚本
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
TAG="1.2.0"
|
||||
docker stop chinaport-data-signature && docker rm -f chinaport-data-signature
|
||||
docker rmi -f weasleyj/chinaport-data-signature:${TAG}-arm64
|
||||
docker build -t weasleyj/chinaport-data-signature:${TAG}-arm64 . -f ./Dockerfile
|
||||
docker login -u weasleyj
|
||||
docker push weasleyj/chinaport-data-signature:${TAG}-arm64
|
||||
exit 0
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
TAG="1.2.0"
|
||||
docker stop chinaport-data-signature && docker rm -f chinaport-data-signature
|
||||
docker rmi -f weasleyj/chinaport-data-signature:${TAG}
|
||||
docker build -t weasleyj/chinaport-data-signature:${TAG} . -f ./Dockerfile
|
||||
docker login -u weasleyj
|
||||
docker push weasleyj/chinaport-data-signature:${TAG}
|
||||
exit 0
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
TAG="1.2.0"
|
||||
IMAGE="weasleyj/chinaport-data-signature"
|
||||
|
||||
# 可选:先移除旧容器和镜像
|
||||
docker stop chinaport-data-signature 2>/dev/null && docker rm -f chinaport-data-signature 2>/dev/null
|
||||
|
||||
# 登录一次即可
|
||||
docker login -u weasleyj
|
||||
|
||||
# 多平台构建并推送(arm64 + amd64),如只需 arm64 可调整
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
-t ${IMAGE}:${TAG} \
|
||||
--push \
|
||||
-f ./Dockerfile .
|
||||
Reference in New Issue
Block a user