update-docker-service.sh 456 B

1234567891011121314
  1. #!/bin/bash
  2. TAG="$1"
  3. if [ ! -n "$TAG" ]; then
  4. echo "MUST INPUT THE IMAGE TAG"
  5. exit 1
  6. fi
  7. echo "start pull and stop and replace hertzbeat container"
  8. docker pull registry.cn-hangzhou.aliyuncs.com/tomsun28/hertzbeat:"$TAG"
  9. docker stop hertzbeat
  10. docker rm hertzbeat
  11. docker run -d -p 11157:1157 -v /home/ubuntu/hertzbeat/application.yml:/opt/hertzbeat/config/application.yml --name hertzbeat registry.cn-hangzhou.aliyuncs.com/tomsun28/hertzbeat:"$TAG"