build.sh 422 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. set -e
  3. ver=$1
  4. if [ -z "$ver" ]; then
  5. echo -e "example:\n./build.sh 10.0"
  6. exit
  7. fi
  8. CLEAN="goproxy proxy"
  9. rm -rf $CLEAN
  10. mkdir goproxy
  11. cd goproxy
  12. wget https://mirrors.host900.com/snail007/goproxy/proxy-linux-amd64.tar.gz
  13. tar zxf proxy-linux-amd64.tar.gz
  14. mv proxy ../
  15. cd ..
  16. docker build --no-cache -t snail007/goproxy:v$ver .
  17. docker tag snail007/goproxy:v$ver snail007/goproxy:latest
  18. docker images
  19. rm -rf $CLEAN