I need to write a sh file, which will be executed under ssh connection.
It needs to run a docker image first, then move to a specified path to execute another sh file. All the operation must be proceed without any user interaction.
my original design is like
#!/bin/bash run docker image (I also try to use source, but same result) cd ~/test ./test.sh
but it will pause after run docker image. If I type exit, then it exit docker shell, and keep executing following commands. But without docker running, test.sh can not run successfully.
How can I solve it? My target is to run this sh file under ssh connection, without any user interaction involved.
Source: Docker Questions