1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-20 18:02:44 +01:00

Updated Docker (markdown)

Donald Webster 2017-03-07 12:58:06 -08:00
parent 49526d4793
commit a47c0dd6da

@ -1,25 +1,18 @@
# Installing Docker ## Installing Docker
* [Get Started with Docker for Windows](https://docs.docker.com/docker-for-windows/) * [Get Started with Docker for Windows](https://docs.docker.com/docker-for-windows/)
* [Get Docker for Ubuntu](https://docs.docker.com/engine/installation/linux/ubuntu/) * [Get Docker for Ubuntu](https://docs.docker.com/engine/installation/linux/ubuntu/)
* [Get Docker for Fedora](https://docs.docker.com/engine/installation/linux/fedora/) * [Get Docker for Fedora](https://docs.docker.com/engine/installation/linux/fedora/)
* [Install Docker on Arch Linux](https://docs.docker.com/engine/installation/linux/archlinux/) * [Install Docker on Arch Linux](https://docs.docker.com/engine/installation/linux/archlinux/)
* [Docker on FreeBSD](https://wiki.freebsd.org/Docker) * [Docker on FreeBSD](https://wiki.freebsd.org/Docker)
# Pick Release or Nightly ## Pick Release or Nightly
* Release: [linuxserver/radarr](https://hub.docker.com/r/linuxserver/radarr/) * Release: [linuxserver/radarr](https://hub.docker.com/r/linuxserver/radarr/)
* Nightly: [hotio/radarr](https://hub.docker.com/r/hotio/radarr/) * Nightly: [hotio/radarr](https://hub.docker.com/r/hotio/radarr/)
Follow the directions on their site to get everything setup and working. Follow the directions on their site to get everything setup and working.
# Create systemd service file # Using systemd
Using your favorite editor, create `/etc/systemd/system/docker-radarr.service` with the following systemd unit file. Be sure to replace `TIMEZONE` and `LOCALPATH` with the correct values.
```bash
sudo nano /etc/systemd/system/docker-radarr.service
```
Copy/Paste the following into nano and change `<YOURTIMEZONE>` + `<LOCALPATH>` accordingly:
See [this link](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for timezones.
```systemd ```systemd
[Unit] [Unit]
@ -28,7 +21,7 @@ Requires=docker.service
After=docker.service After=docker.service
[Service] [Service]
Restart=always Restart=on-failure
RestartSec=30 RestartSec=30
ExecStart=/usr/bin/docker run --rm \ ExecStart=/usr/bin/docker run --rm \
@ -36,7 +29,7 @@ ExecStart=/usr/bin/docker run --rm \
--network host \ --network host \
-e PUID=1000 \ -e PUID=1000 \
-e PGID=1000 \ -e PGID=1000 \
-e TZ=<YOURTIMEZONE> \ -e TZ=<TIMEZONE> \
-v /<LOCALPATH>/config:/config \ -v /<LOCALPATH>/config:/config \
-v /<LOCALPATH>/downloads:/downloads \ -v /<LOCALPATH>/downloads:/downloads \
-v /<LOCALPATH>/movies:/movies \ -v /<LOCALPATH>/movies:/movies \
@ -48,34 +41,22 @@ ExecStop=/usr/bin/docker stop radarr
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```
Save the file using keyboard combo <kbd>Ctrl</kbd>+<kbd>o</kbd>, exit with <kbd>Ctrl</kbd>+<kbd>x</kbd> and set permissions using the command: ##Set permissions
```bash ```bash
sudo chmod 644 /etc/systemd/system/docker-radarr.service sudo chmod 644 /etc/systemd/system/docker-radarr.service
``` ```
Enable the service on boot and start it: ## Enable and Start
```bash ```bash
sudo systemctl enable docker-radarr sudo systemctl enable docker-radarr
sudo systemctl start docker-radarr sudo systemctl start docker-radarr
``` ```
The first time you'll start the container it can take a while because it will need to download the docker image. If you want to prevent this you can do a pull first with: ## Check Status:
```bash
sudo docker pull linuxserver/radarr
```
Let's check if it's running:
```bash ```bash
sudo systemctl status docker-radarr sudo systemctl status docker-radarr
```
Output should be like this if it's running OK:
```bash
● docker-radarr.service - Radarr container ● docker-radarr.service - Radarr container
Loaded: loaded (/etc/systemd/system/docker-radarr.service; enabled; vendor preset: enabled) Loaded: loaded (/etc/systemd/system/docker-radarr.service; enabled; vendor preset: enabled)
Active: active (running) since ma 2017-01-16 00:29:57 CET; 14h ago Active: active (running) since ma 2017-01-16 00:29:57 CET; 14h ago
@ -98,15 +79,15 @@ jan 16 00:30:01 server docker[9946]: [services.d] starting services
jan 16 00:30:01 server docker[9946]: [services.d] done. jan 16 00:30:01 server docker[9946]: [services.d] done.
``` ```
Try going to [http://your-ip-address:7878](http://your-ip-address:7878) in your browser. Try going to <http://your-ip-address:7878> in your browser.
If you like to stop the container: ## Stopping
```bash ```bash
sudo systemctl stop docker-radarr sudo systemctl stop docker-radarr
``` ```
# Updating the docker image ## Update Docker Image
Execute the following commands: Execute the following commands:
@ -115,6 +96,7 @@ sudo docker pull linuxserver/radarr
sudo systemctl restart docker-radarr sudo systemctl restart docker-radarr
``` ```
## Automate Docker Image Update
If you want to automate this, you can use the following script (let it run with a systemd timer): If you want to automate this, you can use the following script (let it run with a systemd timer):
```bash ```bash
@ -136,7 +118,7 @@ done
Modify the variables `images`, `containers` and `services` according to your system. This script will only restart a service/container if the docker image was updated by `docker pull`. Modify the variables `images`, `containers` and `services` according to your system. This script will only restart a service/container if the docker image was updated by `docker pull`.
# Doing some cleanup ## Cleanup
With these commands you can do some cleanup of docker images and containers: With these commands you can do some cleanup of docker images and containers: