Hi,
I need to use a program written by someone else within a Docker container. I have made a script file called bt.sh which runs the third party program with the correct options. It sits in a folder /root/FrMG_Files/.
I can run the script without problems from within the container (starting the container with the -it switch) with the command ./bt.sh from the folder /root/FrMG_Files.
I would like to automate the process by running the script from the windows host as part of a larger sequence.
In windows powershell, I tried to get the file list with :
docker exec -it -w /root/FrMG_Files container_id dir
This works and I see the script file.
I tried to run the script from windows powershell with many variations such as
docker exec -it -w /root/FrMG_Files container_id ./bt.sh
docker exec -it -w /root/FrMG_Files container_id './bt.sh --cmd “command” host''
docker exec -it -w /root/FrMG_Files container_id "./bt.sh"
but none of these worked.
I get the error message:
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec format error": unknown
I guess I am missing only a small thing. I would greatly appreciate some help.
Many Thanks!
P.S. I am using Docker Desktop v19.03.12 in windows 10.