#!
 /bin/bash -ex

start_docker=0
copy_send=0

location=$(pwd)
while getopts 'sc' flag; do
  case "${flag}" in
    s) start_docker=1 ;;
    c) copy_send=1 ;;
    i) assign_ip_flag=1 ;;
  esac
done

if [[ $start_docker -eq 1 ]]
then
    # start python docker container
    docker run --rm -dit --net pub_net --name send python
fi

if [[ $copy_send -eq 1 ]]
then
    # start python docker container
    docker cp send.py send:/
    docker cp send.sh send:/
fi

docker exec -it send /bin/bash