4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
16 # For those usages not covered by the Apache License, Version 2.0 please
17 # contact with: nfvlabs@tid.es
20 # Generates a docker image base on Dockerfile-local and update a running docker stack with the generated image
22 HERE
=$
(dirname $
(readlink
-f ${BASH_SOURCE[0]}))
23 export RO_BASE
=$
(dirname $HERE)
25 echo -e "\n\n[STAGE 1] Building docker image opensourcemano/ro:py3_local based on debian packages"
26 docker build
$RO_BASE -f $RO_BASE/Dockerfile-local
-t opensourcemano
/ro
:py3_local ||
27 ! echo "error generating local dockerfile" >&2 ||
exit 1
29 docker service update osm_ro
--force --image opensourcemano
/ro
:py3_local
31 docker container prune
-f
32 docker service logs osm_ro