Code Monkey home page Code Monkey logo

sickgear.docker's Introduction

SickGear Logo
Docker PullsDocker StarsGitHub Stars

Official SickGear Docker Containers

Table of content
+ Meet the Containers+ Quick Migration
+ Set up a Running Container+ Permissions
+ Container Configuration+ Updating Images
+ Access the SickGear Interface+ Tips & Observations
Official container features
containers for SickGear by SickGearimages maintained by SickGear
easy user and group mappingsquick migration support
super small base imageregular security updates
Multiple architecture image support
amd64(x86) -- arm64 -- arm32v7(armhf) -- ppc64le -- 386 -- s390x

SickGear automates TV management

Some of the sick innovative gear you get;

• Select a UI style anytime; Regular, Proview I, or Proview II
• View new shows from Trakt, IMDb, TVmaze, AniDB and others
• The longest track record of being stable, reliable, and trusted to work
• Most recent added and updated shows available via menu quick links
• Daily Schedule ... "Day by Day" display upcoming release fanart backgrounds
• Automated search always works to save you time manually picking from lists
• Delete watched episodes from any profile in Kodi, Emby, and/or Plex
• Keep all, or a number of most recent episodes; e.g. keep the last 40 releases
• Built-in source providers for max. efficiency with hit graphs and failure stats
• Used on servers, to smaller SoC devices like RPi, BPi etc.


Meet the Containers

These official images are made purposefully small and use Alpine Linux with Python 3.

This sickgear/sickgear:latest image has no moving parts and can be invoked with the --read-only flag.

The sickgear/sickgear:develop image uniquely gives access to new developed features.


Quick Migration

Official SickGear containers support alternative parameters for hassle free experiences...

  • environment variables PUID for user and PGID for group are supported
  • directory config is supported for existing config.ini and database files
  • directory downloads is supported to process incoming media from

SickGear Interface

To access the SickGear application in a running container, navigate in a browser to <container-host-ip>:8081


Set up a Running Container

Choose container use caseImage tagDocs
Track latest SickGear releasesickgear/sickgear:latestRead below
Track latest development featuressickgear/sickgear:developClick here

A basic example of running image:latest as root (not recommended) is:

docker run \
  -p 8081:8081 \
  -v /storage/sickgear-data:/data \
  -v /storage/incoming:/incoming \
  -v /storage/tv:/tv \
  sickgear/sickgear:latest

where volumes /incoming and /tv are mounted to use external data with SickGear.

However, a far better example of running image:latest as a user is:

docker run \
  --name=sickgear \
  --rm -it \
  -e APP_UID=1000 -e APP_GID=44 \
  -p 8081:8081 \
  -v /storage/sickgear-data:/data \
  -v /storage/incoming:/incoming \
  -v /storage/tv:/tv \
  sickgear/sickgear:latest

which includes a uid and gid since it is not recommended to run services as root.
Tips:

  • enter id username on the host OS to get uid and gid
  • --name=<value> secures a name for external apps to refer to a container

click here for docker help

Alternatively, the following can be a basis docker-compose.yml for docker-compose:

version: "3"
services:
  sickgear:
    container_name: sickgear
    image: sickgear/sickgear:latest
    environment:
      - APP_UID=1000
      - APP_GID=44
      - TZ=UTC
    ports:
      - 8081:8081/tcp
    volumes:
      - /storage/sickgear-data:/data
      - /storage/incoming:/incoming
      - /storage/tv:/tv

click here for docker-compose help

Container Configuration

Configure a SickGear container with the following environment variables and parameters...

EnvironmentDescription for environment variable
-e APP_UID=[number]run SickGear as user id, default: 0 (root)
ownership of /data is changed to this user on startup
-e APP_GID=[number]run SickGear as group id, default: 0
useful for making files available for the video or users group
-e TZ=[string]manage shows in supplied timezone e.g. Europe/Berlin
and used by SickGear's config/General/Interface/Timezone
Param [host]:[image]Description for host(ext):image(int) value
-p 8081:8081access port for the SickGear application interface
-v [/path]:/datawhere to store cache, database, and configuraton files
-v [/path]:/incominglocation where to process incoming media from
-v [/path]:/tvlocation for parent folders to store processed media

Data persistence

The /data location can be adjusted using APP_DATA environment variable, which will override the volume that is normally mounted for ease of access to a physical location.

Warning: The ownership of /data will be adjusted to match APP_UID and APP_GID, if they are different.

Permissions

File permissions are only automatically adjusted for /data, so if user id is modified via APP_UID, make sure that user id has proper permissions for /incoming and /tv volumes.

In the above examples, APP_UID was set 1000, and APP_GID set 44, these values were found by running the following on a host Ubuntu set up...

$ id username
uid=1000(username) gid=1000(username) groups=1000(username),4(adm),24(cdrom) ... etc.

Updating Images

Manually update

This image follows the idea that a container should be ephemeral, meaning that the image does not update itself internally. Therefore, the update procedure is to shut down the image, pull an update image, and start the new image in place of the old one

container id example update:

  • docker ps - to get the <container id>
  • docker stop <container id>
  • docker pull sickgear/sickgear:latest - get new image
  • docker image prune - optionally remove dangling images
  • docker run ... - as above, set up a running container

named sickgear example update:

  • docker stop sickgear
  • docker pull sickgear/sickgear:latest - get new image
  • docker image prune - optionally remove dangling images
  • docker run ... - as above, set up a running container

docker-compose example update (omit sickgear to act on all images):

  • docker-compose pull sickgear - update image
  • docker-compose up -d sickgear - update containers
  • docker image prune - optionally remove dangling images

Watchtower update

Watchtower is a small container utility to simplify or automate updating.

manual Watchtower example update:

  • docker run --rm \
      -v /var/run/docker.sock:/var/run/docker.sock \
      containrrr/watchtower \
      --run-once sickgear
  • docker image prune - optionally remove old images

automatic Watchtower example update:

  • docker run -d \
      --name watchtower \
      -v /var/run/docker.sock:/var/run/docker.sock \
      containrrr/watchtower \
      sickgear watchtower

The last two parameters declare container names to watch and update.

click here for more Watchtower help


Docker Tips

  • docker exec -it sickgear sh - shell access to the running container
  • docker logs -f sickgear - display sickgear runtime output

Observations

  • docker cli read: connection refused was fixed by explicitly stating the :latest tag where not including this tag was fine elsewhere
  • avoided using ~/ in the docker run... line as SickGear container failed on startup with cp: can't create '/data/config.ini': Permission denied

arm32v7(armhf)

  • docker failure to run on OSMC was solved with this thread, and by running sudo update-alternatives --config iptables, entering 1 when prompted (iptables-legacy), and rebooting (docker was installed but its service "Failed to start")

Historical

SickGear was sited under namespace ressu/ and then deed02392/ (thanks guys). The backend was fixed Jun 22, 2018 and the image has since been hosted at the official sickgear namespace. Special thanks to resno for his initial help.

sickgear.docker's People

Contributors

deed02392 avatar herkalurk avatar jackdandy avatar ressu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sickgear.docker's Issues

Crash on notification settings

Whenever I try to access the notification settings the docker container crashes without any error messages. I'm running the container with your example command but with modified values for paths, uid and gid

Cannot use NFS backed mount for container data

Due to the chown operation required to execute the container, it is not possible to use an nfs mount point to store configuration data.

I am using CoreOS with Docker and SickGear and using an NFS mount for the /config mountpoint. Due to no-root-squash option on NFS, which is an essential security mechanism when sharing files with NFS, the root chown operation attempted by this Docker container fails, causing the software to stop.

Update readme around watchtower

According to watchtower docker page, you don't need to specify which containers to watch. See below docker-compose file that keeps my containers up to date (including sickgear) without specifying any container.

version: "3"
services:
  watchtower:
    container_name: watchtower
    image: centurylink/watchtower:latest
    logging:
      driver: journald
      options: {}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: unless-stopped

ca-certificates is removed

ca-certificates \

How come we're removing the ca-certificates apk here? I have been getting some SSL errors when using Pushover that are resolved by reinstalling ca-certificates (have to run apk update first). This issue is reproducible.

Edit:
just confirmed that doing apk del ca-certificates does indeed cause all the installed certs to get removed, so this of course then prevents ca-cert verification. Maybe it was being removed because you only wanted to use it for the build process? But because SickGear enforced certificate trust for some services, like Pushover, we do actually need these certs installed.

APP_UID default of 0 is dangerous

Hi, thanks for making this, I intend to use it in a Kubernetes cluster I'm building to learn about it.

I do not have a lot of experience of Docker but I believe that running SickGear as root by default is dangerous, compared with a default UID of nobody for example.

Is it not the case that a user with root privileges in a Docker container, by default will be able to access enough resources in the container to escape it and therefore gain access to the host (I suppose with privileges of the process running Docker)?

Unable to set timezone

Here's the top of my docker compose file:
version: "3"
services:
sickgear:
container_name: sickgear
image: sickgear/sickgear:latest
environment:
- APP_UID=1000
- APP_GID=100
- TZ=America/New_York

When I run the container, the logs stop at this error for a minute and a half:
sickgear | /opt/SickGear/lib/tzlocal/unix.py:158: UserWarning: Can not find any timezone configuration, defaulting to UTC.
sickgear | warnings.warn('Can not find any timezone configuration, defaulting to UTC.')

I've also tried putting 'EDT' in as the timezone, and that still triggers this error. What are valid time zone values for the TZ variable?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.