Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Ability to mount docker.sock and run commands against other docker containers #116

Closed
jacobrreed opened this issue Apr 25, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request Feature Request

Comments

@jacobrreed
Copy link

Right now im using the Tautulli docker mode script, so that when a new movie is added, it calls the trigger.py to make posterizarr generate a poster for that one movie or show. What I would like is after that is done, for posterizarr to be able to call an overlay only run on Kometa (Plex Meta Manager) so that the overlays update with new poster, Kometa doesnt do single runs against one movie, but I think just running overlays would suffice.

Describe the solution you'd like
For this to work I think you'd have to allow docker.sock to be mounted, docker cli installed in the image itself maybe, then some form of dumping a script into a scripts folder for posterizarr to run with a trigger

Describe alternatives you've considered
Not sure of others way

Additional context
Add any other context or screenshots about the feature request here.

@fscorrupt
Copy link
Owner

fscorrupt commented Apr 25, 2024

i added docker-cli to the dev image, please try it with this and report back if it works for you, you still have to mount the docker.sock tho -v /var/run/docker.sock:/var/run/docker.sock

image: ghcr.io/fscorrupt/docker-posterizarr-dev:latest

@jacobrreed
Copy link
Author

Ok I'll investigate thanks

@fscorrupt
Copy link
Owner

fscorrupt commented Apr 25, 2024

you could then place a script inside the posterizarr config dir with such a content

$containerName = "kometa"
$command = "python", "kometa.py", "-ov", "-is", "-r", "-l", "OverlayTest"

# Execute the command inside the Docker container
docker exec -it $containerName $command

then you are able to call it from anywhere with:

docker exec -it posterizarr pwsh ./config/YOURSCRIPT.ps1

@jacobrreed
Copy link
Author

how would I get this working with tautulli script, I want it so that the tautulli script runs (which creates that file in posterizarr to pickup to create poster for newly added items), then after that script runs I want it to call the above script

@jacobrreed
Copy link
Author

Essentially I guess there should be something similar to how the tautulli scripts works, where it creates a file or something for posterizarr to pickup and run, i.e the script could write to a file called like "update-kometa-overlays.posterizarr" and posterizarr would watch and see that, run the command (which calls the docker exec to run overlays) then delete the file, similar to how to it works with the tautulli script

@fscorrupt
Copy link
Owner

fscorrupt commented Apr 25, 2024

You would need to update the trigger.py to add the docker exec command, best would be with an sleep/wait of a minute or two then posterizarr would create the poster in meantime and tautulli then triggers the docker exec, but in posterizarr there is currently no way of doing this, i will add the function when kometa has it integrated.

@jacobrreed
Copy link
Author

ya I wish Kometa had the ability to trigger a single overlay update

@jacobrreed
Copy link
Author

ok well i will close this, I discussed with kometa team and its not something they'll probably ever do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants