| 1234567891011121314151617181920 |
- #!/bin/bash
- IMAGE_NAME=$1
- IMAGE_VERSION=$2
- mkdir $IMAGE_NAME
- cd $IMAGE_NAME
- git clone gogs@gogs.unicraft.org:unicraft/$IMAGE_NAME.git .
- git checkout master
- git pull
- git checkout $IMAGE_VERSION
- git submodule update --init --recursive
- cd -
- mkdir $(pwd)/docker/current
- mount --bind $(pwd)/$IMAGE_NAME $(pwd)/docker/current
- docker build -t $IMAGE_NAME:$IMAGE_VERSION $(pwd)/docker || true
- umount $(pwd)/docker/current
- rm -Rf $(pwd)/docker/current
- rm -Rf $IMAGE_NAME
|