build.sh 395 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. set -e
  3. if [ "$#" -ne 1 ]; then
  4. echo "USAGE: $0 NODEJS_VERSION"
  5. exit 1
  6. fi
  7. export VERSION=$(date "+%4Y%m%d%H%M%S")
  8. export CODE="mint-nodejs-$1"
  9. export TAR="$CODE-$VERSION-$(uname -m)"
  10. podman pull ubuntu:latest
  11. podman build --build-arg NODEJS_VERSION=$1 -t $CODE .
  12. podman save --format=oci-archive -o $TAR.tar $CODE
  13. md5sum $TAR.tar >$TAR.md5
  14. echo "done($TAR.tar)."
  15. exit 0