您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

21 行
960B

  1. #!/usr/bin/env bash
  2. mvn clean
  3. mvn package -Dmaven.test.skip=true
  4. image_version=$version
  5. # 删除镜像
  6. docker rmi -f $(
  7. docker images | grep registry.cn-shanghai.aliyuncs.com/telpo_platform/iot_gateway_service | awk '{print $3}'
  8. )
  9. # 构建telpo/mrp:$image_version镜像
  10. docker build . -t telpo/iot_gateway_service:$image_version
  11. #TODO:推送镜像到阿里仓库
  12. echo '=================开始推送镜像======================='
  13. docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com
  14. docker tag telpo/iot_gateway_service:$image_version registry.cn-shanghai.aliyuncs.com/telpo_platform/iot_gateway_service:$image_version
  15. docker push registry.cn-shanghai.aliyuncs.com/telpo_platform/iot_gateway_service:$image_version
  16. echo '=================推送镜像完成======================='
  17. #删除产生的None镜像
  18. docker rmi -f $(docker images | grep none | awk '{print $3}')
  19. # 查看镜像列表
  20. docker images