summaryrefslogtreecommitdiffstats
path: root/build/creating_data
diff options
context:
space:
mode:
authorTomáš Levora <t.levora@partner.samsung.com>2019-02-27 17:00:25 +0100
committerTomáš Levora <t.levora@partner.samsung.com>2019-02-28 09:44:28 +0100
commit51ec4d199e6a7a6cb314e6b4d575303070c056d8 (patch)
treeda5b6b5c3ae16e057cd33ceec44c971d09c50e1e /build/creating_data
parent086d1219e19d823be65e1b7c73db06f454996969 (diff)
Save docker images based on list
Save all docker images to tarballs based on list instead of saving all local registry to prevent not necessary images in the package Issue-ID: OOM-1683 Change-Id: Iaf4e092ff124f753d50be876d6ab564c7f349ddc Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
Diffstat (limited to 'build/creating_data')
-rwxr-xr-xbuild/creating_data/save-docker-images.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/build/creating_data/save-docker-images.sh b/build/creating_data/save-docker-images.sh
index f4a5d3c7..4c764556 100755
--- a/build/creating_data/save-docker-images.sh
+++ b/build/creating_data/save-docker-images.sh
@@ -27,7 +27,8 @@ if [ "$IS_COMMON_FUNCTIONS_SOURCED" != YES ] ; then
. "${LOCAL_PATH}"/"${RELATIVE_PATH}"/common-functions.sh
fi
-IMG_DIR="$1"
+LIST="${1}"
+IMG_DIR="${2}"
if [[ -z "$IMG_DIR" ]]; then
IMG_DIR="./images"
@@ -55,13 +56,11 @@ save_image() {
echo "Save all images"
line=1
-lines=$(docker images|grep -v 'IMAGE ID'|wc -l)
+lines=$(wc -l ${LIST})
while read -r image; do
echo "== pkg #$line of $lines =="
- name=$(echo $image|awk '{print $1}')
- tag=$(echo $image|awk '{print $2}')
- save_image "$name:$tag"
+ save_image "${image}"
line=$((line+1))
-done <<< "$(docker images|grep -v 'IMAGE ID'|awk '{printf("%s %s\n", $1, $2)}'|column -t)"
+done < "${LIST}"