Created
February 17, 2019 23:15
-
-
Save shzaur/08340241d57a3b294b8f4cbcc8cca2b4 to your computer and use it in GitHub Desktop.
Save all images from a docker-compose.yml
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 | |
# https://gist.github.com/jcataluna/1dc2f31694a1c301ab34dac9ccb385ea#gistcomment-2222429 | |
for img in $(docker-compose config | awk '{if ($1 == "image:") print $2;}'); do | |
images="$images $img" | |
done | |
docker save -o services.img $images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment