2016-10-26 15:19:50 -05:00
#!/bin/bash
## This script is to retrieve and import the docker-base image from
## local folder where the image is built on the local machine
##
## USAGE:
## ./get_docker-base.sh
set -x -e
. ./functions.sh
2016-12-15 19:19:11 -06:00
TARGET_PATH = $( sed -n 's/TARGET_PATH\s*=\s*//p' slave.mk)
2016-10-26 15:19:50 -05:00
## [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Read-only link of Azure Blob storage with shared access signature (SAS)")]
2024-02-28 15:08:17 -06:00
BASE_URL = "https://sonicstorage.blob.core.windows.net/public/docker-base.ea507753d98b0769e2a15be13003331f8ad38d1c15b40a683e05fc53b1463b10.gz"
2016-10-26 15:19:50 -05:00
base_image_name = docker-base
docker_try_rmi $base_image_name
2016-12-15 20:16:47 -06:00
mkdir -p $TARGET_PATH
2016-12-15 19:19:11 -06:00
wget --no-use-server-timestamps -O $TARGET_PATH /$base_image_name .gz " $BASE_URL "
docker load < $TARGET_PATH /$base_image_name .gz