I need to run an application from a specific directory.
$ sudo docker run -P ubuntu/decomposer 'cd /local/deploy/decomposer; ./decomposer-4-15-2014'
2014/10/09 21:30:03 exec: "cd /local/deploy/decomposer; ./decomposer-4-15-2014": stat cd /local/deploy/decomposer; ./decomposer-4-15-2014: no such file or directory
That directory definitely exists, and if I connect to docker by running bash interactively I can run the above command.
$ sudo docker run -i -t ubuntu/decomposer /bin/bash
# cd /local/deploy/decomposer; ./decomposer-4-15-2014
I can run my program by specifying the full path, but then it crashes as it expects to be launched from the current directory. What can I do?
This might me be due to the permission issue or the instance is not able to find the executable available path. To check this try adding the executable available location in path and try running the script
to add the current directory in path kindly use the below command