Last active
December 23, 2015 05:09
-
-
Save fsouza/6584979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PREFIX=registry.cloud.tsuru.io/tsuru/ | |
read command | |
for image in "$@" | |
do | |
echo "Generating $image... " | |
full_image=${PREFIX}${image} | |
id=`docker -H 127.0.0.1:4243 run -d $full_image $command` | |
status=`docker -H 127.0.0.1:4243 wait $id` | |
if [ "x$statusx" = "x0x" ] | |
then | |
docker -H 127.0.0.1:4243 commit $id $full_image | |
fi | |
docker -H 127.0.0.1:4243 rm $id | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment