Skip to content

Instantly share code, notes, and snippets.

@shzaur
shzaur / gist:08340241d57a3b294b8f4cbcc8cca2b4
Created February 17, 2019 23:15
Save all images from a docker-compose.yml
#!/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