2
0

build-docker-img-server-use-cnpm.sh 462 B

12345678910111213141516171819
  1. if [ "$#" == "0" ]; then
  2. echo "Usage: sh $0 TAG"
  3. echo "\tTAG: 1.2.3"
  4. exit 1
  5. fi
  6. TAG="$1"
  7. echo "BUILD TAG: $TAG"
  8. echo "BUILD CONSOLE..."
  9. cd ./console && cnpm install && cnpm run build:prod
  10. if [ "$?" != "0" ]; then
  11. echo "build console failed!"
  12. exit 2
  13. fi
  14. cd ../
  15. echo "BUILD SERVER..."
  16. docker build -t igeeky/wolf-server:$TAG -f ./server/DockerfileTB ./server
  17. docker build -t igeeky/wolf-server:latest -f ./server/DockerfileTB ./server
  18. echo "BUILD SUCCESS."