SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux > SageTV for unRAID/Docker

Notices

SageTV for unRAID/Docker Discussion related to SageTV for unRAID/Docker. Questions, issues, problems, suggestions, etc. relating to SageTV for unRAID/Docker should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-12-2018, 08:37 PM
Carlton Bale Carlton Bale is offline
Sage Advanced User
 
Join Date: Sep 2010
Location: Indianapolis, Indiana, USA
Posts: 120
Docker Configuration via Synology Docker GUI

I installed the SageTV Java 10 Docker on my Synology NAS. Docker is configured via a GUI and I want to make sure I'm implementing the original instruction correctly. Feedback appreciated.

Original instructions I'm following:
Code:
docker run -d --name sagetv-server \
  -v /home/seans/unRAID/mnt/user/sagemedia:/var/media \
  -v /home/seans/unRAID/mnt/user/mediaext:/var/mediaext \
  -v /home/seans/unRAID/mnt/user/apps/sagetv3:/opt/sagetv \
  -v /home/seans/unRAID:/unraid \
  --net host \
  --env PUID=1000 \
  --env PGID=1000 \
  --env VIDEO_GUID=19 \
  --env OPT_GENTUNER=Y \
  --env OPT_COMMANDIR=Y \
  --env OPT_COMSKIP=Y \
  --env JAVA_MEM_MB=768 \
  --env VERSION=latest \
  --env OPT_SETPERMS=Y \
  --privileged \
  -t -i stuckless/sagetv-server-java8
Here' the General Settings screen. Container Name takes care of: --name sagetv-server and high privilege takes care of --privileged \


The Volumes tab takes care of the -v ... commands:


Port settings are auto, taking care of --net host \


Environment settings take care of the --env settings



Question: After removing all of the GUI-entered commands, the original run command distills down to this:
Code:
docker run -d -t -i docker/sagetv-server-java10
Is this correct? Do I need the the -d, -t, and -i arguments?

What's the purpose of the "docker/sagetv-server-java10" path? Do I need that?

Thanks in advance!

Last edited by Carlton Bale; 04-12-2018 at 08:41 PM.
Reply With Quote
  #2  
Old 04-13-2018, 07:12 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,711
I don't think your volumes are correct.

the -v commands map NAS volumns to CONTAINER volumes. (ie, path on your synology file system to path INSIDE the docker container)

Code:
  -v /home/seans/unRAID/mnt/user/sagemedia:/var/media \
  -v /home/seans/unRAID/mnt/user/mediaext:/var/mediaext \
  -v /home/seans/unRAID/mnt/user/apps/sagetv3:/opt/sagetv \
  -v /home/seans/unRAID:/unraid \
So in your case you are not using /var/media or /opt/sagetv and as such recordings and sagetv configurations will be stored INSIDE your container and restarts/upgrades will likely blow it all away.

So in your UI it would appear that your RIGHT HAND side must be values like /opt/sagetv and /var/media/ and the LEFT HAND side will be full paths to where you want this information stored on your NAS. And neither of them can be READ ONLY (sagetv will need to write to those paths)

The ENV section will need some tweaking as well
Code:
  --env PUID=1000 \
  --env PGID=1000 \
  --env VIDEO_GUID=19 \
  --env OPT_GENTUNER=Y \
  --env OPT_COMMANDIR=Y \
  --env OPT_COMSKIP=Y \
  --env JAVA_MEM_MB=768 \
  --env VERSION=latest \
  --env OPT_SETPERMS=Y \
PUID and GUID MUST be the linux user and group ON YOUR SYNOLOGY system under which sagetv will run. (on unRAID this is 99,100 respectively, on my personal linux system this is 1000,1000 respectively).

The VIDEO_GUID needs to be group id of the "video" group which generally has read access to the /dev/video# nodes.

SETPERMS if set to Y will change the ownership of all files under /var/media and /opt/sagetv (is your mounted paths) to be the PUID and PGUID so that when you access the files over smb or some other means, you actually have access to those files.
Reply With Quote
  #3  
Old 04-14-2018, 05:53 PM
Carlton Bale Carlton Bale is offline
Sage Advanced User
 
Join Date: Sep 2010
Location: Indianapolis, Indiana, USA
Posts: 120
Thanks Stuckless. This helps tremendously. I now understand what the volume mount commands are doing and got everything in the container mapped.

For UIDs, my initial thought is that everything could go under root. SSH into the Synology system gives root UID/GID/Groups = 0 and and an existing docker container shows similar. Or should I run it under a specific user account?


For the Video_GUID, I'm completely lost. I can't find any reference to that in the Synology system for any user or group, and no reference for /dev/video#. There is no video output from the Synology; it's completely headless. I'm not sure what I need to do that Video_GUID, if anything. Thoughts?

Last edited by Carlton Bale; 04-14-2018 at 07:53 PM.
Reply With Quote
  #4  
Old 04-15-2018, 11:21 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,711
Quote:
Originally Posted by Carlton Bale View Post
Thanks Stuckless. This helps tremendously. I now understand what the volume mount commands are doing and got everything in the container mapped.

For UIDs, my initial thought is that everything could go under root. SSH into the Synology system gives root UID/GID/Groups = 0 and and an existing docker container shows similar. Or should I run it under a specific user account?


For the Video_GUID, I'm completely lost. I can't find any reference to that in the Synology system for any user or group, and no reference for /dev/video#. There is no video output from the Synology; it's completely headless. I'm not sure what I need to do that Video_GUID, if anything. Thoughts?
if you can ssh into your NAS, then you can figure out these UIDs like this..

Code:
$ cat /etc/group | grep video
It will show something like,
Code:
video:x:44:
so 44 is the video guid.

So the next would be to figure out is Synology is owning everything as root or not. So use the 'ls -al' command on some media file that you copied to your nas.

ie, when ssh'd to the your NAS if you have files in /media/videos/ (as an example), then
$ ls -al /media/videos
it will show complete username and group ownerships
-r--r--r-- 1 seans seans 828 Feb 15
if the user shows up as root root then yeah, synology runs as root and owns everything as root. But if it shows something else, that likely that is the user that the NAS is using for file ownerships, and you need to set the PUID and PGUID to their numeric user and group values.

$ cat /etc/passwd | grep seans
seans:x:1000:1000:Sean Stuckless,,,:/home/seans:/bin/bash

in the above case seans user has a user:group ids of 1000 and 1000.
Reply With Quote
  #5  
Old 04-17-2018, 08:51 PM
Carlton Bale Carlton Bale is offline
Sage Advanced User
 
Join Date: Sep 2010
Location: Indianapolis, Indiana, USA
Posts: 120
Thanks for the tip on the "ls -al" command. It looks like the files are owned by the default admin account (1024) and the users account group (100).

Quote:
Originally Posted by stuckless View Post
if you can ssh into your NAS, then you can figure out these UIDs like this..

Code:
$ cat /etc/group | grep video
It will show something like,
Code:
video:x:44:
so 44 is the video guid.
I previously tried something similar, and unfortunately, there is nothing in /etc/group for video. Here's the full list via "cat /etc/group", and nothing obviously links to video.

Code:
#$_@GID__INDEX@_$276949$
administrators:x:101:sysadmin
avahi:x:84:
bind:x:53:
daemon:x:2:daemon,root
dbus:x:81:
dovecot:x:143:dovecot
ftp:x:21:ftp
http:x:1023:user1
ldap:x:439:
log:x:19:root
lp:x:7:lp
maildrop:x:126:
mysql:x:66:
nobody:x:99:
ntp:x:87:
postfix:x:125:postfix
postgres:x:55:
root:x:0:
rpc:x:32:
smmsp:x:25:sysadmin,smmsp
StorageAnalyzer:x:276949:
SynoFinder:x:195341:
SynologyGuests:x:106:
system:x:1:system
users:x:100:
wheel:x:10:
I don't think I can just remove the video environment variable. It doesn't seem to launch, and I'm assuming that's the issue.

Last edited by Carlton Bale; 04-17-2018 at 09:00 PM.
Reply With Quote
  #6  
Old 04-18-2018, 05:02 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,711
So the video group only comes into play, later, if you are actually using video hardware. Based on your group list, you can probably set it to 1, and it won't be used until you add video hardware (and you don't add video hardware, then no worries either).

If sagetv is not starting up, then you'll want to check the docker logs to see if there is a problem.

How does synology start your docker container? Does it provide a log?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nullencodingserver in docker graywolf SageTV for unRAID/Docker 2 07-28-2017 10:09 AM
Docker Questions SWKerr SageTV for unRAID/Docker 12 06-16-2017 06:14 AM
Docker question wayner SageTV for unRAID/Docker 5 05-27-2017 05:51 PM
Is unRAID/Docker the right OS for me? wayner SageTV for unRAID/Docker 32 01-12-2017 03:08 PM
Docker container coppit SageTV Github Development 20 09-06-2015 06:26 PM


All times are GMT -6. The time now is 08:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.