images.sh 535 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. ImageTag=$1
  4. if [ -n "$ImageTag" ]
  5. then
  6. echo "当前镜像tag: $ImageTag"
  7. else
  8. echo "请输入当前镜像tag"
  9. exit
  10. fi
  11. ### go build
  12. echo "============ go build start ================"
  13. make img-build ImageTag="${ImageTag}"
  14. echo "============push images end ================"
  15. export DOCKER_CLI_EXPERIMENTAL=enabled
  16. docker buildx version
  17. docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
  18. docker buildx create --use --name mybuilder
  19. docker buildx inspect mybuilder --bootstrap