Docker exec from inside docker


I have two dockers running.

The first one is NZBGet, a download manager (called Docker A) and the second one is handbrake, a video converter software (called Docker B).

I want to run a command inside a Postprocess Script from Docker A
docker exec handbrake …

My problem is, if I run this command from inside Docker A, i get the error message “docker: command not found”.

I found in this forum, that I should run “docker exec -it handbrake…” but I get the same problem with it.

Do I have to install docker inside the docker first?
If yes, how can I do this, if there is just a simple busybox without apt-get used by docker A?

First of all you have two containers running and not two dockers. Containers are isolated from each other and the host. docker exec can be used only on the docker host, not inside a container. I am quite sure the postprocess scripts are not designed to run docker exec commands.

The postprocess script can be a wrapper at best, that commands a remote “handbreak server” (i your case container B) to perform an action.

In case you created a docker-compose.yml for your setup, I might be willing to give a look at it. If you just used commands, then someone else needs to pitch in.