Read baseimage from the dockerfile

Updated deploy.sh and build scripts
to read base image from the dockerfile

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2020-04-22 17:30:34 +05:30
committed by mergify[bot]
parent 697ed32778
commit bfa6064b4d
4 changed files with 14 additions and 8 deletions

View File

@ -67,8 +67,8 @@ build_push_images() {
IFS=
digest=$(awk -v ARCH=${ARCH} '{if (archfound) {print $NF; exit 0}}; {archfound=($0 ~ "arch.*"ARCH)}' <<<"${manifests}")
IFS=$ifs
sed -i "s|\(^FROM.*\)${baseimg}.*$|\1${baseimg}@${digest}|" "${dockerfile}"
GOARCH=${ARCH} make push-image-cephcsi
base_image=${baseimg}@${digest}
GOARCH=${ARCH} BASE_IMAGE=${base_image} make push-image-cephcsi
done
}