健康同学微信公众号h5项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 line
1.4KB

  1. #!/bin/bash
  2. ###
  3. # @Date: 2022-08-18 09:19:07
  4. # @LastEditors: JinxChen
  5. # @LastEditTime: 2022-08-18 09:29:15
  6. # @FilePath: \TelpoH5FrontendWeb\setup_production.sh
  7. # @description:
  8. ###
  9. npm -v
  10. npm config set registry https://registry.npmmirror.com
  11. npm install
  12. npm run build
  13. image_version=$version;
  14. # 删除镜像
  15. docker rmi -f $(docker images | grep registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web | awk '{print $3}')
  16. # 构建telpo/mrp:$image_version镜像
  17. docker build --no-cache . -t telpo/health_student_web:$image_version;
  18. #TODO:推送镜像到阿里仓库
  19. echo '=================开始推送镜像======================='
  20. #docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com
  21. #docker login --username=telpo_fengjj@1111649216405698 --password=PWDaliyun123 registry.cn-shanghai.aliyuncs.com
  22. docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com
  23. docker tag telpo/health_student_web:$image_version registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$image_version
  24. docker push registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$image_version
  25. echo '=================推送镜像完成======================='
  26. #删除产生的None镜像
  27. docker rmi -f $(docker images | grep none | awk '{print $3}')
  28. # 查看镜像列表
  29. docker images;