Docker: Difference between revisions

2,648 bytes added ,  28 July 2024
Added NAS stuff, cleanup.
(Reworked page for more legible scribbles then before.)
(Added NAS stuff, cleanup.)
 
(One intermediate revision by the same user not shown)
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install docker docker-compose
sudo systemctl enable docker
</syntaxhighlight>
sudo systemctl start docker
</syntaxhighlight>Fully update the system, install docker and docker compose and enable related services.
 
== Common Docker Commands: ==
sudo docker-compose up -d
</syntaxhighlight>Sudo is used here as Portainer binds to docker.sock. -d runs the compose container(s) in the background.
 
== Common NAS stack inside docker example ==
Docker compose will be used, all containers (that are separate services, databases and libraries excluded) will be in separate docker-compose.yaml files.
 
Docker will expose host ports listed to all interfaces by default, you can bind via the following:<syntaxhighlight lang="bash">
-p 127.0.0.1:80:80
</syntaxhighlight><syntaxhighlight lang="yaml">
ports:
- 127.0.0.1:80:80
</syntaxhighlight>We will be installing the following:
 
[https://github.com/qdm12/gluetun Gluetun] - VPN client. Supports providers, openvpn, wireguard, DNS over TLS, etc.
 
[https://deluge-torrent.org/ Deluge] - Torrent client, subsitiute with any.
 
[https://sonarr.tv/ Sonarr] - TV/Anime organizer. Sorts, requests, renames and tells plex when media is imported.
 
[https://radarr.video/ Radarr] - Movie organizer. Sorts, requests, renames and tells plex when media is imported.
 
[https://prowlarr.com/ Prowlarr] - One stop shop for indexers. *arr requests torrents from this. (Alternitive: [https://github.com/Jackett/Jackett Jackett])
 
[https://www.plex.tv/ Plex] - Serve the media we grab.
 
Every service will be in its own docker-compose.yaml file, and in its own folder. All docker folders will be contained in /opt/.<syntaxhighlight lang="bash">
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install docker docker-compose
sudo systemctl start docker && sudo systemctl enable docker
sudo mkdir /opt/docker
cd /opt/docker
sudo mkdir gluetun deluge sonarr radarr prowlarr plex
</syntaxhighlight>Update the system, install and enable docker/docker compose, create a docker folder in opt and subfolders for every service.
 
== Plex ==
https://github.com/plexinc/pms-docker
 
Plex's official docker page does not have compose files, so ill hand convert the host networking command:<syntaxhighlight lang="bash">
docker run -d --name plex --network=host -e TZ="<timezone>" -e PLEX_CLAIM="<claimToken>" -v <path/to/plex/database>:/config -v <path/to/transcode/temp>:/transcode -v <path/to/media>:/data plexinc/pms-docker
</syntaxhighlight><syntaxhighlight lang="yaml">
services:
plex:
image: plexinc/pms-docker
container_name: plex
network_mode: host
environment:
- TZ=America/Detroit
- PLEX_CLAIM="<claimToken>"
volumes:
~/database:/config
~/temp:/transcode
:/media:/data
restart: unless-stopped
</syntaxhighlight>
 
== Gluetun ==
 
== Deluge ==
 
== Prowlarr ==
 
== Sonarr ==
 
== Radarr ==
35

edits