I am using next commands to open a docker container in interactive mode and using following commans inside bash session with this container.
docker run -v /scriptsIA:/scriptsIA -v /opt/tomcat/webapps/PokeTrainer/imgIA:/imgsIA -it dbmobilelife/docker-python-opencv-tesseract bash
cd /scriptsIA/
python
from SegmentarImagen import *
extraerNombreUsuarioNiveldeUnaFoto("/imgsIA/andres.jpg")
exit()
exit
I have tried to create a bash script as follows:
#!/bin/bash
docker run -v /scriptsIA:/scriptsIA -v /opt/tomcat/webapps/PokeTrainer/imgIA:/imgsIA -it dbmobilelife/docker-python-opencv-tesseract bash
cd /scriptsIA/
python
from SegmentarImagen import *
extraerNombreUsuarioNiveldeUnaFoto("/imgsIA/andres.jpg")
exit()
exit
However, when i execute this bash script all i get is the following error:
[root@poketrainer /]# sh scriptIA.sh docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"bash\r\": executable file not found in $PATH": unknown. : No existe el fichero o el directorio scriptIA.sh: línea 4: $'python\r': no se encontró la orden scriptIA.sh: línea 5: from: no se encontró la orden scriptIA.sh: línea 6: error sintáctico cerca del elemento inesperado
"/imgsIA/andres.jpg"' 'criptIA.sh: línea 6:
extraerNombreUsuarioNiveldeUnaFoto("/imgsIA/andres.jpg")
How can I do the explained bash script above withouth getting errors?