flexget-dockerfile
Flexget Dockerfile for automated Docker builds.
What is Flexget?
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.
How to use this image
Run on host networking
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.
Configuration
Because 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:
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}}'
View log information
To monitor the flexget logs (highly recommended) simply run:
Run out of schedule
Sometimes you don't want to wait for the flexget process to kick on from the scheduler. In these cases you can simply enter:
Note the first flexget is the container name, and the second is the CLI command. This will run all tasks regardless of scheduling.
Implementation
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.