1
0
mirror of https://github.com/rancher/os.git synced 2025-06-23 05:27:03 +00:00
os/scripts/tar-images

23 lines
613 B
Plaintext
Raw Normal View History

2016-05-06 17:12:09 +00:00
#!/bin/bash
set -ex
2016-05-06 17:12:09 +00:00
cd $(dirname $0)/..
IMAGES=$(bin/host_ros c images -i build/initrd/usr/share/ros/os-config.yml)
echo "tar-image: IMAGES=$IMAGES"
2016-05-06 17:12:09 +00:00
for i in $IMAGES; do
echo "tar-image: pull($i)"
2016-05-06 17:12:09 +00:00
if [ "${FORCE_PULL}" = "1" ] || ! docker inspect $i >/dev/null 2>&1; then
docker pull $i
fi
done
2018-05-10 04:33:16 +00:00
if [ -e ".make-vmware" ]; then
2018-05-12 09:18:30 +00:00
docker pull rancher/os-openvmtools:${OPEN_VMTOOLS_VERSION}
IMAGES="$IMAGES rancher/os-openvmtools:${OPEN_VMTOOLS_VERSION}"
2018-05-10 04:33:16 +00:00
fi
echo "tar-images: docker save ${IMAGES} > build/images.tar"
docker save ${IMAGES} | xz > build/images.tar
echo "tar-images: DONE"