docker run --privileged -m=<at least 12g works for me> --name $name -h $hostname --network=cda --network-alias=$hostname -d "$registry/$name:$version"
Now, you can run a script, but probably you will need to re-run the second part after line #Deploy the proxy container. To make sure, run docker ps and check if sandbox-proxy container is running; if not, just run the second part of the script.
Like I said, for me that works, hope it will work for you.