If I am on my host machine, I can kickoff a script inside a Docker container using:
docker exec my_container bash myscript.sh
However, let's say I want to run myscript.sh inside my_container from another container bob. If I run the command above while I'm in the shell of bob, it doesn't work (Docker isn't even installed in bob).
What's the best way to do this?
Simply launch your container with something like
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker ...
and it should do the trick
Run shell script inside Docker container from another Docker container?