1

I have 2 docker containers on my raspberry:

  • PyLoad

  • FileBot (this container start and stop after its job finished)

I have a hook in my PyLoad container that can trigger a command when a download is finished. I would like to trigger a script run of my Filebot container.

To run the filebot script manually from host, I do this :

docker run -v /media:/tmp filebot -script fn:amc --output "/tmp" --log ALL --log-file amc.log --action move --conflict override -non-strict "/tmp/DL/complete" --def "movieFormat=/tmp/Movies/{n} {y}/{fn}" --def "seriesFormat=/tmp/TV Shows/{n}/{'S'+s}/{fn}" --def excludeList=amc.txt

How can I trigger this command from my PyLoad container ?

I thought about sending a signal from container to host but I can only find the way to do the opposite.

I wanted to share my /usr/bin through a volume but I wondered if there is a better way to do this. Also the filebot script need to be run with several volumes associated with my host.

Thank you

thk
  • 69
  • 8
  • 1
    Possible duplicate of: https://stackoverflow.com/questions/32163955/how-to-run-shell-script-on-host-from-docker-container http://stackoverflow.com/questions/31720935/execute-host-commands-from-within-a-docker-container – ingroxd Nov 04 '18 at 20:55
  • I tried it but it seems that I cannot access the host filesystem with this trick, when I do this I have a docker command not found error – thk Nov 05 '18 at 18:51

1 Answers1

0

Ok I did it with a mix of elements found in similar posts. This command worked for me : docker run -ti --entrypoint=/bin/bash -p 8000:8000 -v /media/HDD/DL/complete:/opt/pyload/Downloads -v /usr/bin:/usr/bin -v /var/run/docker.sock:/var/run/docker.sock --name pyload thk-pyload

I could access the docker from host and run my other container with it. As simply as it is, the volumes were mounted correctly with my host !

thk
  • 69
  • 8