plex-db-sync icon indicating copy to clipboard operation
plex-db-sync copied to clipboard

Docker issues

Open goofballtech opened this issue 5 years ago • 0 comments

Running docker on unraid and had a time getting it all working. Had to map the docker instance and commands into the container and tweak the ssh commands a bit to get the remote side to connect properly. Wanted to share in case it helps anyone else int he future.

docker run -d 
--name='plex-db-sync' 
-e 'CRON'='0 0,4 ? * 1/7 *' 

-e 'DEBUG'='false' 
-e 'S1_SSH_USER'='root' 
-e 'S1_SSH_PORT'='22' 
-e 'S1_SSH_HOST'='1.1.1.1'
-e 'S1_SSH_KEY'='/sshkey/MyPrivKey.txt' 
-e 'S1_SSH_PATH'='/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases/' 
-e 'S1_STOP'='ssh -o '\''StrictHostKeyChecking=no'\'' -i /sshkey/MyPrivKey.txt [email protected] '\''docker stop plex'\''' 
-e 'S1_START'='ssh -o '\''StrictHostKeyChecking=no'\'' -i /sshkey/MyPrivKey.txt [email protected] '\''docker start plex'\''' 

-e 'S2_DB_PATH'='/mnt/S2' 
-v '/mnt/user/appdata/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases':'/mnt/S2':'rw'
-e 'S2_STOP'='docker stop plex' 
-e 'S2_START'='docker start plex' 

-v '/usr/bin/docker':'/usr/bin/docker':'rw' 
-v '/var/run/docker.sock':'/var/run/docker.sock':'rw' 
-v '/etc/localtime':'/etc/localtime':'ro' 
-v '/mnt/user/appdata/plex-db-sync/sshkey':'/sshkey':'rw' 
--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined 'nowsci/plex-db-sync'

goofballtech avatar Mar 22 '19 22:03 goofballtech