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
# Install "sshpass" on macOS. | |
# | |
# - sshpass allows you to easily automate password entry | |
# prompts for ssh sessions. | |
# | |
# Don't mess around with terminal if you | |
# don't know what any of this means, please. | |
# Evaluate for learning purposes at your own risk. | |
# | |
# Licensed under MIT. See below. |
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 | |
mkdir -p out | |
for img in `grep image $1| sed -e 's/^.*image\: //g'`; | |
do | |
cleanname=${img/\//-} | |
tag=`docker images | grep $img | awk '{print $2}'` | |
echo "Exporting image: $img, tag:$tag ($cleanname)..." | |
docker save $img -o out/$cleanname.tar |