mall-search.sh 490 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. app_name='mall-search'
  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 8081:8081 --name ${app_name} \
  10. --link mysql:db \
  11. --link elasticsearch:es \
  12. -e TZ="Asia/Shanghai" \
  13. -v /etc/localtime:/etc/localtime \
  14. -v /mydata/app/${app_name}/logs:/var/logs \
  15. -d mall/${app_name}:1.0-SNAPSHOT
  16. echo '----start container----'