Created
February 10, 2015 20:30
-
-
Save alloy-d/db1c653a43890b577f87 to your computer and use it in GitHub Desktop.
Build multiple docker images using the same Ansible directory as build context.
This file contains hidden or 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/sh | |
if [ "$1" = "" ]; then | |
echo "Please specify the name of an image in the images directory." | |
fi | |
DIR="images/${1}" | |
if [ ! -d "$DIR" ]; then | |
echo "${DIR} doesn't exist!" | |
echo "Please specify the name of an image in the images directory." | |
exit 1 | |
fi | |
tar -c . -C "$DIR" . | docker build -t "overturemedia/${1}" - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment