Created
March 1, 2016 02:55
-
-
Save mathewdgardner/b8b834b9d94da898b5df to your computer and use it in GitHub Desktop.
Revisions
-
Mathew Gardner created this gist
Mar 1, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/bash # Save docker images ds() { docker images | \ cut -d ' ' -f 1 | \ tail -n +2 | \ xargs -t -n 1 -I {} -P 4 \ sh -c 'docker save {} | bzip2 > $(echo "{}" | sed "s/^.*\///").tar.bz2' } # Load docker images dl() { ls *.bz2 | \ xargs -t -n 1 -I {} -P 4 \ sh -c 'bzip2 -dc {} | docker load' }