diff options
Diffstat (limited to 'packages/docker')
-rw-r--r-- | packages/docker/README.md | 4 | ||||
-rw-r--r-- | packages/docker/pom.xml | 21 | ||||
-rw-r--r-- | packages/docker/src/main/docker/Dockerfile | 5 | ||||
-rw-r--r-- | packages/docker/src/main/docker/do-start.sh | 27 | ||||
-rw-r--r-- | packages/docker/src/main/docker/wait-for-port.sh | 19 |
5 files changed, 52 insertions, 24 deletions
diff --git a/packages/docker/README.md b/packages/docker/README.md index 41a5c6e2..c8bc6b54 100644 --- a/packages/docker/README.md +++ b/packages/docker/README.md @@ -1,3 +1,7 @@ +Copyright 2018 AT&T Intellectual Property. All rights reserved. +This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +Full license text at https://creativecommons.org/licenses/by/4.0/legalcode + To build the policy-drools docker image: 1. Build the policy-drools repository 2. Run: policy-drools/docker-verify.sh or policy-drools/docker-build.sh or policy-drools/docker-merge.sh as required. diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml index 5d90809b..8d745d28 100644 --- a/packages/docker/pom.xml +++ b/packages/docker/pom.xml @@ -65,27 +65,6 @@ </artifactItems> </configuration> </execution> - <execution> - <id>copy-apps-zip</id> - <phase>prepare-package</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/policy-drools</outputDirectory> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - <artifactItems> - <artifactItem> - <groupId>org.onap.policy.drools-applications.controlloop.packages</groupId> - <artifactId>apps-controlloop</artifactId> - <version>${project.version}</version> - <type>zip</type> - <destFileName>apps-controlloop.zip</destFileName> - </artifactItem> - </artifactItems> - </configuration> - </execution> </executions> </plugin> <plugin> diff --git a/packages/docker/src/main/docker/Dockerfile b/packages/docker/src/main/docker/Dockerfile index 6d5c4ab7..b06edf1b 100644 --- a/packages/docker/src/main/docker/Dockerfile +++ b/packages/docker/src/main/docker/Dockerfile @@ -42,13 +42,12 @@ RUN mkdir -p ${POLICY_HOME}/config ${POLICY_LOGS} ${POLICY_INSTALL}/config && \ WORKDIR ${POLICY_INSTALL} -COPY install-drools.zip apps-controlloop.zip docker-install.sh do-start.sh wait-for-port.sh ./ +COPY install-drools.zip docker-install.sh do-start.sh wait-for-port.sh ./ VOLUME [ "${POLICY_INSTALL}/config", "${POLICY_HOME}/config" ] RUN unzip -o install-drools.zip && \ - unzip -o apps-controlloop.zip && \ - rm install-drools.zip apps-controlloop.zip && \ + rm install-drools.zip && \ chown -R policy:policy * && \ chmod +x *.sh diff --git a/packages/docker/src/main/docker/do-start.sh b/packages/docker/src/main/docker/do-start.sh index 5f156979..c1ae41d2 100644 --- a/packages/docker/src/main/docker/do-start.sh +++ b/packages/docker/src/main/docker/do-start.sh @@ -1,4 +1,23 @@ #!/bin/bash +### +# ============LICENSE_START======================================================= +# +# ================================================================================ +# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### # skip installation if build.info file is present (restarting an existing container) if [[ -f ${POLICY_HOME}/etc/build.info ]]; then @@ -23,6 +42,14 @@ else find -L ${POLICY_HOME}/config -type l -exec rm -- {} + fi + apps=$(ls config/apps*.zip 2> /dev/null) + + echo "Applications found: ${apps}" + + if [[ -n ${apps} ]]; then + unzip -o ${apps} + fi + echo "docker install at ${PWD}" ./docker-install.sh diff --git a/packages/docker/src/main/docker/wait-for-port.sh b/packages/docker/src/main/docker/wait-for-port.sh index 10f08ded..65c6a5c1 100644 --- a/packages/docker/src/main/docker/wait-for-port.sh +++ b/packages/docker/src/main/docker/wait-for-port.sh @@ -1,4 +1,23 @@ #!/bin/bash +### +# ============LICENSE_START======================================================= +# +# ================================================================================ +# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### if [[ $# -ne 2 ]]; then echo "Usage: wait-for-port hostname port" >&2 |