#!/bin/bash
docker stop na1 
docker rm na1
 screen -dmS t1 -T xterm sh -c "docker run -p 10.0.2.10:2023:2022 -v ~/tfs-ctrl/tempOC/files:/files --name na1 -it asgamb1/oc23bgp.img:latest  
"              
      sleep  2                                                                                                                                              
      if [ "$( docker container  inspect -f '{{.State.Running}}' na1)" = "true" ]; then                                                                     
            
                                                                       
                                                                            
            docker  exec na1 sh -c "   cp /files/platform_t1.xml demoECOC21.xml ; 
                                       
                                         /confd/examples.confd/OC23/startNetconfAgent.sh;    "                                                                       
      else                                          
            echo "your container is not running yet"
      fi

