50.docker-image-create.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. set -e
  2. #---------------------------------------------------------------------
  3. # 参数
  4. args_="
  5. export basePath=/root/temp/svn
  6. # "
  7. #---------------------------------------------------------------------
  8. echo "#1 copy docker-image from ReleaseFile"
  9. publishPath="$basePath/Publish/release/release/Station(net5.0)"
  10. dockerPath=$basePath/Publish/release/release/docker-image
  11. \cp -rf "$basePath/Publish/ReleaseFile/docker-image/." "$dockerPath"
  12. #---------------------------------------------------------------------
  13. echo "#2 copy station"
  14. for file in $(find $basePath -name *.csproj -exec grep '<docker>' -l {} \;)
  15. do
  16. cd $basePath
  17. publishName=`grep '<publish>' $file -r | grep -oE '\>(.*)\<' | tr -d '<>/'`
  18. dockerName=`grep '<docker>' $file -r | grep -oE '\>(.*)\<' | tr -d '<>/'`
  19. echo "#2.* copy $dockerName, publishName:$publishName"
  20. \cp -rf "$publishPath/$publishName/." "$dockerPath/$dockerName/app"
  21. done
  22. echo "#3 copy 单体压测"
  23. \cp -rf "$basePath/Publish/release/release/StressTest/单体压测net5.0/ServiceCenter/." "$dockerPath/sers-demo-sersall/app"