1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-16 16:04:08 +01:00

Updated Docker container on Ubuntu 16.04 LTS (markdown)

hotio 2017-01-16 15:39:30 +01:00
parent d16f394326
commit d5b372a974

@ -2,7 +2,7 @@
Let's start by installing docker from the Docker repository. Execute the following commands: Let's start by installing docker from the Docker repository. Execute the following commands:
``` ```bash
sudo apt -y install linux-image-extra-virtual sudo apt -y install linux-image-extra-virtual
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt update && sudo apt -y install docker-engine sudo apt update && sudo apt -y install docker-engine
@ -10,11 +10,13 @@ sudo apt update && sudo apt -y install docker-engine
# Create systemd service file # Create systemd service file
`sudo nano /etc/systemd/system/docker-radarr.service` ```bash
sudo nano /etc/systemd/system/docker-radarr.service
```
Copy/Paste the following into nano: Copy/Paste the following into nano:
``` ```systemd
[Unit] [Unit]
Description=Radarr container Description=Radarr container
Requires=docker.service Requires=docker.service
@ -30,9 +32,15 @@ ExecStop=/usr/bin/docker stop radarr
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```
Save the file using keyboard combo `Ctrl+o`, exit with `Ctrl+x` and set permissions using the command:
```bash
sudo chmod 644 /etc/systemd/system/docker-radarr.service
```
Enable the service on boot and start it: Enable the service on boot and start it:
``` ```bash
sudo systemctl enable docker-radarr sudo systemctl enable docker-radarr
sudo systemctl start docker-radarr sudo systemctl start docker-radarr
``` ```
@ -41,11 +49,13 @@ The first time you'll start the container it can take a while because it will ne
Let's check if it's running: Let's check if it's running:
`sudo systemctl status docker-radarr` ```bash
sudo systemctl status docker-radarr
```
Output should be like this if it's running OK: 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
@ -70,13 +80,30 @@ jan 16 00:30:01 server docker[9946]: [services.d] done.
If you like to stop the container: If you like to stop the container:
`sudo systemctl stop docker-radarr` ```bash
sudo systemctl stop docker-radarr
```
# Updating the docker image # Updating the docker image
Execute the following commands: Execute the following commands:
``` ```bash
sudo docker pull linuxserver/radarr sudo docker pull linuxserver/radarr
sudo systemctl restart docker-radarr sudo systemctl restart docker-radarr
``` ```
# Doing some cleanup
With these commands you can do some cleanup of docker images and containers:
```bash
# Remove leftover containers
sudo docker ps -a -f status=exited -q | xargs -r sudo docker rm
# Remove leftover images
sudo docker images --no-trunc -q -f dangling=true | xargs -r sudo docker rmi
# Remove dangling volumes
sudo docker volume ls -qf dangling=true | xargs -r docker sudo volume rm
```