local_build.sh 572 B

12345678910111213141516171819202122232425262728293031
  1. # 本地build脚本
  2. echo 'remove container'
  3. docker container stop au_front_prod
  4. docker container rm au_front_prod
  5. docker container stop au_front
  6. docker container rm au_front
  7. echo 'remove image'
  8. docker rmi au_front:prod
  9. docker rmi au_front:dev
  10. # echo 'remove package-lock.json'
  11. # rm package-lock.json
  12. echo 'remove .nuxt'
  13. rm -rf .nuxt
  14. echo 'remove node_modules'
  15. rm -rf node_modules
  16. echo 'docker build'
  17. docker build -f Dockerfile.prod -t au_front:prod .
  18. echo 'docker run dev container'
  19. docker run -d -p 9011:3000 -v ${PWD}:/app --name au_front_prod au_front:prod