Files
versions-for-swarm/build.sh
seahi 2bf72e1feb
Some checks failed
continuous-integration/drone/push Build encountered an error
Update app.py
2025-12-17 08:51:11 +08:00

26 lines
744 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
REGISTRY="harbor.seahi.me/stu"
IMAGE_NAME="whoami-for-swarm"
# 构建 v1.0
docker build --build-arg APP_VERSION=v1.0 \
-t ${REGISTRY}/${IMAGE_NAME}:v1.0 .
docker push ${REGISTRY}/${IMAGE_NAME}:v1.0
# 构建 v2.0
docker build --build-arg APP_VERSION=v2.0 \
-t ${REGISTRY}/${IMAGE_NAME}:v2.0 .
docker push ${REGISTRY}/${IMAGE_NAME}:v2.0
# 构建 v2.1
docker build --build-arg APP_VERSION=v2.1 \
-t ${REGISTRY}/${IMAGE_NAME}:v2.1 .
docker push ${REGISTRY}/${IMAGE_NAME}:v2.1
# 构建 v3.0-buggy有问题的版本
docker build --build-arg APP_VERSION=v3.0-buggy --build-arg BUGGY=true \
-t ${REGISTRY}/${IMAGE_NAME}:v3.0-buggy .
docker push ${REGISTRY}/${IMAGE_NAME}:v3.0-buggy
echo "✅ 所有版本构建完成!"