Created
November 14, 2014 17:34
-
-
Save kisom/210f57a5c3b26d4861be to your computer and use it in GitHub Desktop.
Export a container to a GPG-encrypted tarball.
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/sh | |
CONTAINER="$1" | |
BASENAME="$2" | |
OWNER="[email protected]" | |
if [ -z "$BASENAME" ] | |
then | |
echo "No basename provided." | |
exit | |
elif [ -z "$CONTAINER" ] | |
then | |
echo "No container name provided." | |
exit | |
fi | |
echo | |
docker export $CONTAINER | gzip - | gpg -o ${BASENAME}.tgz.gpg -r $OWNER -e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment