To answer the previous poster YES it will see your USB drives within the docker.
I’ll try and mark all the commands in code text so it’s easy to see what you need to type and what is my ramblings.
First lets stop sonarr from running and disable it from starting back up
Code: Select all
sudo systemctl stop sonarr
Code: Select all
sudo systemctl disable sonarr
Code: Select all
sudo dietpi-software
Code: Select all
mkdir /home/dietpi/sonarr
Code: Select all
su
For TZ copy and paste your own timezone from here and overwrite the antarctica one in my example:
https://en.wikipedia.org/wiki/List_of_t ... time_zones
Assuming you use port 8989 leave that section as is. However let’s say you currently use 9898 make it say -p 9898:8989 (that maps the internal port of the docker that sonarr is using 8989 and makes it available externally on 9898).
The -v is going to give the docker access to your servers file system and map it to a filesystem on the inside of the docker. For simplicity and compatibility with the NZB/Torrent app, I strongly suggest you map it to the same mount point on the server as inside the docker. The location before the colon is the servers location, after the colon is what it is mapped to on the docker
For example if I had an external hd mounted as /mnt/external I would map it inside the docker as /mnt/external.
-v /mnt/external:/mnt/external
Sonarr needs access to the place where your NZB/Torrent app downloads to and also the location where you want it to finish up in. Eg if your nzb app downloads to:
/mnt/external/downloads
but the final renamed file ends up in
/mnt/external/tv
Then just mount /mnt/external (it will cover both) with:
-v /mnt/external:/mnt/external
However if your downloads are saved in:
/home/dietpi/downloads
and your finished location is
/mnt/external/tv
you will need to mount both locations in the docker, so use two lines
-v /home/dietpi/downloads:/home/dietpi/downloads
-v /mnt/external/tv:/mnt/external/tv
We will also map our folder we created before as /config. We will copy our config we already use in sonarr into it later
-v /home/dietpi/sonarr:/config \
Ok so now we should be good to create the docker!! Fill in the details below based on what you need and copy/paste this (yes the whole thing) at the command line and press enter. Don’t mess the formatting up - make sure you run as root.
Code: Select all
docker create \
--name=sonarr \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Antarctica/Syowa \
-e UMASK_SET=022 `#optional` \
-p 8989:8989 \
-v /home/dietpi/sonarr:/config \
-v /mnt/external:/mnt/external \
--restart unless-stopped \
linuxserver/sonarr
Let’s start the docker and check things are working without our config:
Code: Select all
docker start sonarr
http://youripaddresshere:8989
Make sure it loads - that’s all we care about for now
Code: Select all
docker stop sonarr
Do this as your dietpi user:
Code: Select all
cp -r /mnt/dietpi_userdata/sonarr/* /home/dietpi/sonarr
Code: Select all
docker start sonarr
http://youripaddresshere:8989
With any luck you should be done. Check the sonarr logs for any warnings/errors.
If you have radarr, it’s almost the same to do it:
Code: Select all
sudo systemctl stop radarr
Code: Select all
sudo systemctl disable radarr
Code: Select all
mkdir /home/dietpi/radarr
Code: Select all
cp -r /mnt/dietpi_userdata/radarr/* /home/dietpi/radarr
Code: Select all
docker create \
--name=radarr \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Antarctica/Syowa \
-e UMASK_SET=022 `#optional` \
-p 7878:7878 \
-v /home/dietpi/radarr:/config \
-v /mnt/external:/mnt/external \
linuxserver/radarr
Code: Select all
docker start radarr
http://youripaddresshere:7878
Bonus - how to install sabnzbd as a docker (no cfg copy though you can probably do that if you can find it)
as dietpi user:
Code: Select all
sudo systemctl stop sabnzbd
Code: Select all
sudo systemctl disable sabnbd
Code: Select all
mkdir /home/dietpi/sabnzbd
Code: Select all
docker create \
--name=sabnzbd \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Antarctica/Syowa \
-p 8080:8080 \
-p 9090:9090 \
-v /home/dietpi/sabnzbd:/config \
-v /mnt/external:/mnt/external \
--restart unless-stopped \
linuxserver/sabnzbd
Code: Select all
docker start sabnzbd
http://youripaddresshere:8080
======================================================
If you stuff up and want to go back to what you had
As root:
Code: Select all
docker stop sonarr
Code: Select all
docker rm sonarr
Code: Select all
systemctl enable sonarr
Code: Select all
systemctl start sonarr
After you are happy everything is running ok make sure to uninstall sonarr from dietpi-software
======================================================
I hope this helps, it looks tricky and it might be if its your first docker. If this works for you take a look at the other great dockers provided by linuxserver.io they all follow a similar idea to what you learnt with this:
https://hub.docker.com/u/linuxserver