健康同学微信公众号h5项目
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

29 linhas
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.npm.taobao.org
  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;