Flexget Dockerfile for automated Docker builds.
From Flexget:
FlexGet is a multipurpose automation tool for all of your media.
Support for torrents, nzbs, podcasts, comics, TV, movies, RSS, HTML, CSV, and more.
This example uses host networking for simplicity. Also note the -v arguments. This image will expect the flexget directory to contain a valid config.yml. Flexget will also use this directory for storing the resulting database and log file. The other directories, input and output are essentially working directories for Flexget. The intention is that the input directory is where files are downloaded to (from transmission, youtube-dl, etc) and the output directory is where the sorted and renamed files will be moved to; however, this can all be changed via the Flexget configuration file.
sudo docker run -d --net="host" --name flexget -v /home/kevin/flexget:/flexget -v /home/kevin/Downloads:/input -v /home/kevin/media:/output kmb32123/flexget-dockerfileBecause of the way the volumes are attached to the host, paths can be very simple. An example of a task configuration that sorts tv episode looks like so:
sort-tvseries:
find:
path: /input/tv
regexp: '.*\.(mkv|mp4)$'
recursive: yes
template: tv
move:
to: /output/video/tv/{{series_name}}/Season {{series_season|pad(2)}}
filename: 'S{{series_season|pad(2)}} E{{series_episode|pad(2)}} {{tvdb_ep_name}}'To monitor the flexget logs (highly recommended) simply run:
sudo docker logs -f flexgetSometimes you don't want to wait for the flexget process to kick on from the scheduler. In these cases you can simply enter:
sudo docker exec -it flexget flexget executeNote the first flexget is the container name, and the second is the CLI command. This will run all tasks regardless of scheduling.
This image is based on python:2-onbuild and consequently debian:jessie.
As of now, the version of Flexget installed will soley depend on the latest version available in the Python Package Index. I may change this in the future to manually install from flexget:master but for right now this suites my needs.