Created
December 26, 2017 16:17
-
-
Save Creased/1868c561864e1e77532b030482b91292 to your computer and use it in GitHub Desktop.
Backup Docker images
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/bash | |
| OUTPUT="images/linuxkit.tar" | |
| IMG_REGEX="/^(linuxkit)/" | |
| IMG_IDS=$(docker images | awk '{if ($1 ~ '${IMG_REGEX}') print $3}') | |
| docker save ${IMG_IDS} -o ${OUTPUT} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment