diff options
Diffstat (limited to 'auth/docker')
-rw-r--r-- | auth/docker/Dockerfile.hello | 17 | ||||
-rwxr-xr-x | auth/docker/dbuild.sh | 17 | ||||
-rw-r--r-- | auth/docker/dpush.sh | 2 |
3 files changed, 29 insertions, 7 deletions
diff --git a/auth/docker/Dockerfile.hello b/auth/docker/Dockerfile.hello index 2002822a..2378bae0 100644 --- a/auth/docker/Dockerfile.hello +++ b/auth/docker/Dockerfile.hello @@ -17,7 +17,7 @@ # limitations under the License. # ============LICENSE_END==================================================== # -FROM ${DOCKER_REPOSITORY}/onap/aaf/aaf_core:${AAF_VERSION} +FROM ${DOCKER_REPOSITORY}/onap/aaf/aaf_base:${AAF_VERSION} MAINTAINER AAF Team, AT&T 2018 ENV VERSION=${AAF_VERSION} @@ -25,11 +25,16 @@ LABEL description="aaf_hello" LABEL version=${AAF_VERSION} COPY bin/pod_wait.sh /opt/app/aaf/bin/ +COPY lib /opt/app/aaf/lib COPY etc /opt/app/osaaf/etc -RUN mkdir -p /opt/app/aaf/status && chmod 755 /opt/app/aaf/bin/* &&\ - if [ -n "${DUSER}" ]; then \ - chown ${DUSER}:${DUSER} /opt/app/aaf/status &&\ - chown ${DUSER}:${DUSER} /opt/app/osaaf &&\ - chown -R ${DUSER}:${DUSER} /opt/app/aaf; fi +COPY bin/hello /opt/app/aaf/bin/ + +RUN mkdir -p /opt/app/osaaf &&\ + mkdir -p /opt/app/aaf/status &&\ + chmod 755 /opt/app/aaf/bin/* &&\ + if [ -n "${DUSER}" ]; then chown ${DUSER}:${DUSER} /opt/app/aaf/status \ + && chown ${DUSER}:${DUSER} /opt/app/osaaf \ + && chown -R ${DUSER}:${DUSER} /opt/app/aaf;\ + fi CMD [] diff --git a/auth/docker/dbuild.sh b/auth/docker/dbuild.sh index 3ecdd112..3b764547 100755 --- a/auth/docker/dbuild.sh +++ b/auth/docker/dbuild.sh @@ -121,6 +121,23 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${ $DOCKER tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:latest rm aaf_${VERSION}/Dockerfile +######## +# Fourth, do Hello +# Apply currrent Properties to Docker file, and put in place. +cd - +sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \ + -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \ + -e 's/${DUSER}/'${DUSER}'/g' \ + Dockerfile.hello >../aaf_${VERSION}/Dockerfile +cd .. +echo "#######" +pwd +echo "#######" +cp -Rf sample/etc aaf_${VERSION} +$DOCKER build -t ${ORG}/${PROJECT}/aaf_hello:${VERSION} aaf_${VERSION} +$DOCKER tag ${ORG}/${PROJECT}/aaf_hello:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_hello:${VERSION} +$DOCKER tag ${ORG}/${PROJECT}/aaf_hello:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_hello:latest +rm -Rf aaf_${VERSION}/Dockerfile aaf_${VERSION}/etc # Final cleanup rm aaf_${VERSION}/bin/pod_wait.sh diff --git a/auth/docker/dpush.sh b/auth/docker/dpush.sh index 380f6aa5..50113b91 100644 --- a/auth/docker/dpush.sh +++ b/auth/docker/dpush.sh @@ -24,7 +24,7 @@ . ./d.props DOCKER=${DOCKER:=docker} -AAF_COMPONENTS="config agent base core cass $(cat components) " +AAF_COMPONENTS="config agent base core cass hello " for AAF_COMPONENT in ${AAF_COMPONENTS}; do # docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${OLD_VERSION} |