I am running several docker containers running on my server, and need to exec a git pull for a repository that is on all of them.
I have tried using this:
I'd assume you have more than one container running, and $(docker ps -q)
is expanding to some_container1 606a1083d0be
and it's treating 606a1083d0be
as the command you want to run, which doesn't exist. Can you post the output of docker ps -q
alone to confirm please? Also if you want just the latest container id, try substituting $(docker ps -ql)
instead.
Edit: in response to your confirmation, exactly what I said is happening. As for why it worked before, you likely only had one container running then.