This image aims to be a best practices compliant docker image for SickGear.
There are no moving parts inside the image and the image can be invoked with
the --read-only
flag.
The image is intentionally kept small and is based on the Alpine variation of the Python image.
Since SickGear operates on external data, the /incoming
and /tv
volumes
need to be mounted. The most simple form of running the image is:
docker run -v /storage/incoming:/incoming -v /storage/tv:/tv -v /storage/sickgear-data:/data -p 8081:8081 ressu/sickgear
This image stores data by default in /data
, the path can be adjusted with
APP_DATA
environment variable. Usually this volume is mounted to a physical
location for ease of access.
warning: The image will automatically adjust the ownership of /data
volume
to match the userid of SickGear
This image follows the idea that the container should be ephemeral. This means that the image does not update itself internally. Update procedure is simply shutting down the image, pulling an update image and starting the new image in place of the old one
An example update would be something like:
docker kill <container-id>
docker pull ressu/sickgear
docker run -v /storage/incoming:/incoming -v /storage/tv:/tv -v /storage/sickgear-data:/data -p 8081:8081 ressu/sickgear
If you want automatic updates, you can use watchtower. Watchtower is a small utility packed inside a container that periodically tries to update containers.
You can use watchtower as follows:
docker run -d --name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
centurylink/watchtower \
sickgear watchtower
The last two parameters define names of the containers you want to watch. By default Docker launches containers under randomized names. If you want to change your SickGear container to a certain name You need to add a --name <containername>
to the run command. For example:
docker run \
--name sickgear
-v /storage/incoming:/incoming \
-v /storage/tv:/tv \
-v /storage/sickgear-data:/data \
-p 8081:8081 ressu/sickgear
By default there are 3 volumes for easy access. The default volumes are preconfigured in SickGear for ease of use.
The default location for SickGear databases and configuraiton files is set to /data, this volume will also contain the SickGear cache, since it is by default set to the same location
In the default configuration /incoming
is marked as the post-processing
directory.
Default configuration includes /tv
as the show root directory.
Outside of /data, the file permissions are not adjusted automatically, so if you need
to modify the user id (via APP_UID
), you need to make sure that the user has
proper permissions for the /incoming
and /tv
volumes.
Since it is not recommended to run services as root, the image supports switching users on the fly. Here are some of the central environment variables
Numeric user id for the service. On startup, the /data
volume ownership is
changed to this user. Default user id is 0 (root)
Numeric group id for the service. Useful for making files available for the
video
or users
group.
Location of the application data. Default value is /data
.
The ownership of the path in APP_DATA
is changed to match APP_UID
.
You can use the TZ environment to adjust the default timezone of the service.
By default SickGear listens on port 8081, this port is exposed from the image.
To ease testing and development, there is also a variant of this image that
includes git. It can be installed by using the image ressu/sickgear:develop
A complete example of running the service with a certain UID and timezone would be:
docker run --rm -it -e APP_UID=1000 -e APP_GID=44 -p 8081:8081 -v /storage/sickgear-data:/data -v /storage/tv:/tv -v /storage/incoming:/incoming -e TZ=Europe/Berlin ressu/sickgear