X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2Ftest%2FSTD_1.1.3%2Fbuild_and_start.sh;h=1ccd232051d10b573e88913b978c003fff9653f8;hb=refs%2Fchanges%2F71%2F12371%2F1;hp=dd1ac8a7df41743c2c5d90592d1d3dd7e22c4db5;hpb=21be2e0c890fb9604d0add2942fcff19b6fe2fb2;p=sim%2Fa1-interface.git diff --git a/near-rt-ric-simulator/test/STD_1.1.3/build_and_start.sh b/near-rt-ric-simulator/test/STD_1.1.3/build_and_start.sh index dd1ac8a..1ccd232 100755 --- a/near-rt-ric-simulator/test/STD_1.1.3/build_and_start.sh +++ b/near-rt-ric-simulator/test/STD_1.1.3/build_and_start.sh @@ -1,7 +1,7 @@ #!/bin/bash # ============LICENSE_START=============================================== -# Copyright (C) 2020 Nordix Foundation. All rights reserved. +# Copyright (C) 2021 Nordix Foundation. 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. @@ -17,13 +17,34 @@ # ============LICENSE_END================================================= # -#Script to build and start the container +# Script to build and start the container +# Make sure to run the simulator with the same arg as this script +print_usage() { + echo "Usage: ./build_and_start.sh duplicate-check|ignore-duplicate " + exit 1 +} +if [ $# -ne 1 ]; then + print_usage +fi +if [ $1 == "duplicate-check" ]; then + DUP_CHECK=1 +elif [ $1 == "ignore-duplicate" ]; then + DUP_CHECK=0 +else + print_usage +fi + +echo "Building image" cd ../../ #Build the image docker build -t a1test . -#Run the container in interactive mode -docker run -it -p 8085:8085 -e A1_VERSION=STD_1.1.3 a1test \ No newline at end of file +docker stop a1StdSimulator > /dev/null 2>&1 +docker rm -f a1StdSimulator > /dev/null 2>&1 + +echo "Starting ric-sim" +#Run the container in interactive mode, unsecure port 8085, secure port 8185 +docker run --rm -it -p 8085:8085 -p 8185:8185 -e A1_VERSION=STD_1.1.3 -e ALLOW_HTTP=true -e REMOTE_HOSTS_LOGGING=1 -e DUPLICATE_CHECK=$DUP_CHECK --volume "$PWD/certificate:/usr/src/app/cert" --name a1StdSimulator a1test