Skip to content

Latest commit

 

History

History
168 lines (124 loc) · 4.87 KB

Docker.md

File metadata and controls

168 lines (124 loc) · 4.87 KB
title description published date tags editor dateCreated
Docker
true
2024-12-18 21:48:44 UTC
markdown
2022-09-18 05:00:08 UTC

Install Docker

Follow the instructions for your operating system here.

Running a Docker FlexGet image

Official Image

LinuxServer.io

Based on python:3.11-alpine

This image includes:

  • cloudscraper
  • deluge-client
  • qbittorrent-api
  • python-telegram-bot
  • transmission-rpc

If you need other pip or alpine packages, you can create a custom script to run as an entrypoint to install them before running flexget or create your own custom image with this image as a base.

Usage

docker cli:

docker run -d \
  --name flexget \
  -v /host/config:/config \        # required
  -e TZ=$TIMEZONE \                # optional: defaults to UTC
  -p 5050:5050 \                   # optional: for webui
  ghcr.io/flexget/flexget \
  daemon start --autoreload-config

docker compose:

services:
  flexget:
    image: ghcr.io/flexget/flexget
    container_name: flexget
    command:
      - daemon
      - start
      - --autoreload-config         # optional
    ports:
      - 5050:5050                   # optional: for webui
    environment:
      - TZ=$TIMEZONE                # optional: defaults to UTC
    volumes:
      - /host/config:/config        # required
      - /host/downloads:/downloads 

Replace volumes: host paths (eg. /host/config) with the host directory path you would like to use for the config and download folders. Add additional as needed.

Replace $TIMEZONE with desired timezone. See list of valid timezones here. Use the name in the tz database name column. Defaults to UTC if not specified.

Valid image tags:

  • latest (default) - latest tagged version release
  • develop - latest commit on develop branch
  • major.minor.patch version (e.g. ghcr.io/flexget/flexget:3.4.0)
  • major.minor version (e.g ghcr.io/flexget/flexget:3.4)
  • major version (e.g. ghcr.io/flexget/flexget:3)

Custom entrypoint

entrypoint.sh

#!/bin/sh

apk add --no-cache $PKG1

pip install $PKG2

flexget daemon start --autoreload-config

Make sure it's executeable: chmod +x entrypoint.sh

Entrypoint usage

With docker cli, add --entrypoint argument:

docker run ... -v /host/config:/config --entrypoint /config/entrypoint.sh ...

With docker compose, add entrypoint:

services:
  flexget:
    ...
    entrypoint: /config/entrypoint.sh
    ...

Custom Dockerfile

FROM  ghcr.io/flexget/flexget

RUN   set -x; \
		  apk add --no-cache PKG 
      # or 
      pip install --no-cache-dir PKG

Build the image:

docker build -t <flexget image tag here>

To upgrade your image to the latest FlexGet version make sure you add the --pull argument to your build command:

docker build --pull -t <flexget image tag here>

Upgrading

Since config files may need updating when the minor version gets bumped, best practice would be to pin the minor version in your compose file or docker run command. e.g. ghcr.io/flexget/flexget:3.13 If you are not pinning it, make sure you understand what docker commands will cause new versions to be pulled, and check Upgrade Actions and make sure everything is working as expected after upgrading.

Compose

Run docker compose pull (after updating your pinned version if set) to pull the latest image.

3rd party images

Build your own image

If you want to build your own, the Synology installation has a docker option with instructions (adjust to your OS as needed since some instructions are Synology specific such as the volume paths).

Tips and tricks

Bash alias for execution

You can set up bash alias (.bashrc) to execute with non standard configuration location:

alias flexget='flexget -c /volume1/config.yml'

Then commands like this will simply work

flexget check