- #!/bin/bash
- # 设置变量
- IMAGE_NAME="crpi-tlcs37dul3eo9h1x.cn-hangzhou.personal.cr.aliyuncs.com/lymat/imgfeature"
- VERSION="v1.1"
- # 构建 Docker 镜像
- echo "Building Docker image..."
- docker build -t ${IMAGE_NAME}:${VERSION} .
- # 推送镜像到仓库
- echo "Pushing Docker image..."
- docker push ${IMAGE_NAME}:${VERSION}
- echo "Build and push completed successfully!"
|