X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2Ftest%2F1.1.x-alpha.2%2Fbuild_and_start.sh;fp=near-rt-ric-simulator%2Ftest%2F1.1.x-alpha.2%2Fbuild_and_start.sh;h=413ea89bb1b1cd95d262b91cba2f08bf47abe2b4;hb=109f3f55a3f0eaac94a9b6954fe2f3db611a991d;hp=bd2acdd9f54118c2c8317c9d138e75703a19e1a8;hpb=b11c353b98286b79e7a74d20e6e36042fd789fba;p=sim%2Fa1-interface.git diff --git a/near-rt-ric-simulator/test/1.1.x-alpha.2/build_and_start.sh b/near-rt-ric-simulator/test/1.1.x-alpha.2/build_and_start.sh index bd2acdd..413ea89 100755 --- a/near-rt-ric-simulator/test/1.1.x-alpha.2/build_and_start.sh +++ b/near-rt-ric-simulator/test/1.1.x-alpha.2/build_and_start.sh @@ -17,14 +17,31 @@ # ============LICENSE_END================================================= # -#Script to build and start the container +# Script to build and start the container +# Args: nonsecure|secure +if [ $# -ne 1 ]; then + echo "Usage: ./build_and_start.sh nonsecure|secure" + exit 1 +fi +if [ "$1" != "nonsecure" ] && [ "$1" != "secure" ]; then + echo "Usage: ./build_and_start.sh nonsecure|secure" + exit 1 +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=1.1.x-alpha.2 a1test +echo "Starting $1 mode" +if [ $1 == "nonsecure" ]; then + #Run the container in interactive mode, unsecure port + docker run -it -p 8085:8085 -e A1_VERSION=1.1.x-alpha.2 -e REMOTE_HOSTS_LOGGING=1 a1test +else + #Run the container in interactive mode, secure port. + docker run -it -p 8185:8185 -e A1_VERSION=1.1.x-alpha.2 -e REMOTE_HOSTS_LOGGING=1 --read-only --volume "$PWD/certificate:/usr/src/app/cert" a1test +fi +