mall-portal.sh 531 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. app_name='mall-portal'
  3. docker stop ${app_name}
  4. echo '----stop container----'
  5. docker rm ${app_name}
  6. echo '----rm container----'
  7. docker rmi `docker images | grep none | awk '{print $3}'`
  8. echo '----rm none images----'
  9. docker run -p 8085:8085 --name ${app_name} \
  10. --link mysql:db \
  11. --link redis:redis \
  12. --link mongo:mongo \
  13. --link rabbitmq:rabbit \
  14. -e TZ="Asia/Shanghai" \
  15. -v /etc/localtime:/etc/localtime \
  16. -v /mydata/app/${app_name}/logs:/var/logs \
  17. -d mall/${app_name}:1.0-SNAPSHOT
  18. echo '----start container----'