blob: ba7a8095a3e4e511224fd8ed7d91351468bd1183 [file] [log] [blame]
Instrumental4ad47632018-07-13 15:49:26 -05001#!/bin/bash
Sai Gandham66118342018-04-04 15:33:05 -05002#
3# Docker Building Script. Reads all the components generated by install, on per-version basis
4#
Instrumental924b18d2018-04-05 20:17:18 -05005# Pull in Variables from d.props
Instrumental9ec28952018-07-12 11:14:10 -05006if [ ! -e ./d.props ]; then
Instrumental4ad47632018-07-13 15:49:26 -05007 cp d.props.init d.props
Instrumental9ec28952018-07-12 11:14:10 -05008fi
9
Instrumentalf482ea02018-04-10 15:03:24 -050010. ./d.props
Instrumental9ec28952018-07-12 11:14:10 -050011
12# Create the Config (Security) Image
Instrumental4ad47632018-07-13 15:49:26 -050013sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' Dockerfile.config >../sample/Dockerfile
Instrumental9ec28952018-07-12 11:14:10 -050014cd ..
15cp ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin
16docker build -t ${ORG}/${PROJECT}/aaf_config:${VERSION} sample
17rm sample/Dockerfile sample/bin/aaf-cadi-aaf-${VERSION}-full.jar
18cd -
19
Instrumental9ec28952018-07-12 11:14:10 -050020# Second, build a core Docker Image
21echo Building aaf_$AAF_COMPONENT...
22# Apply currrent Properties to Docker file, and put in place.
Instrumental4ad47632018-07-13 15:49:26 -050023sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' Dockerfile.core >../aaf_${VERSION}/Dockerfile
Instrumental9ec28952018-07-12 11:14:10 -050024cd ..
25docker build -t ${ORG}/${PROJECT}/aaf_core:${VERSION} aaf_${VERSION}
26rm aaf_${VERSION}/Dockerfile
27cd -
Sai Gandham66118342018-04-04 15:33:05 -050028
29if ["$1" == ""]; then
Instrumental4ad47632018-07-13 15:49:26 -050030 AAF_COMPONENTS=$(ls ../aaf_*HOT/bin | grep -v '\.')
Sai Gandham66118342018-04-04 15:33:05 -050031else
Instrumental4ad47632018-07-13 15:49:26 -050032 AAF_COMPONENTS=$1
Sai Gandham66118342018-04-04 15:33:05 -050033fi
34
35for AAF_COMPONENT in ${AAF_COMPONENTS}; do
Instrumental4ad47632018-07-13 15:49:26 -050036 echo Building aaf_$AAF_COMPONENT...
37 sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' Dockerfile.ms >../aaf_${VERSION}/Dockerfile
38 cd ..
39 docker build -t ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} aaf_${VERSION}
40 rm aaf_${VERSION}/Dockerfile
41 cd -
Sai Gandham66118342018-04-04 15:33:05 -050042done