build.sh 452 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. set -e
  3. # https://laravel.com/docs/master/releases
  4. if [ "$#" -ne 2 ]; then
  5. echo "USAGE: $0 PYTHON_VERSION ARCH"
  6. exit 1
  7. fi
  8. export VERSION=$(date "+%4Y%m%d%H%M%S")
  9. export CODE="mint-python$1"
  10. export TAR="$CODE-$(uname -m)-$VERSION"
  11. docker pull ubuntu:latest
  12. docker build --platform=linux/$2 --build-arg PYTHON_VERSION=$1 -t $CODE .
  13. # docker save -o $TAR.tar $CODE:latest
  14. # md5sum $TAR.tar >$TAR.md5
  15. echo "done($TAR.tar)."
  16. exit 0