f483557cef59ccce70c38dbd39bb45b8ca78f31b
[aaf/authz.git] / auth / auth-cass / docker / dbuild.sh
1 #!/bin/bash
2
3 # Build AAF Cass Docker Script locally
4 #
5 # Pull in AAF Env Variables from AAF install
6 if [ -e ../../docker/d.props ]; then
7   . ../../docker/d.props
8 fi
9 DOCKER=${DOCKER:-docker}
10
11 echo "Building aaf_cass Container for aaf_cass:$VERSION"
12
13 DIR=$(pwd)
14 cd ..
15 sed -e 's/${AAF_VERSION}/'${VERSION}'/g' $DIR/Dockerfile.cass > Dockerfile
16 cd ..
17 cp -Rf sample/cass_data auth-cass/cass_data
18 cp sample/data/sample.identities.dat auth-cass
19
20 echo $DOCKER build -t ${ORG}/${PROJECT}/aaf_cass:${VERSION} auth-cass
21 $DOCKER build -t ${ORG}/${PROJECT}/aaf_cass:${VERSION} auth-cass
22 $DOCKER tag ${ORG}/${PROJECT}/aaf_cass:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_cass:${VERSION}
23 $DOCKER tag ${ORG}/${PROJECT}/aaf_cass:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_cass:latest
24
25 cd -
26 rm Dockerfile
27 rm -Rf cass_data
28 rm sample.identities.dat
29 cd $DIR
30