List used images from Docker Compose
<p>I want to distribute a Docker Compose system as a single archive. For this I want to run <code>docker save</code> on all the images. But how do I get the list of images from Docker Compose?</p>

<p>This is what I do at the moment:</p>

<pre><code>IMAGES=$(cat docker-compose.yml | sed -n 's/image:\(.*\)/\1/p')
docker save -o images.tar $IMAGES
</code></pre>