From 1d1c6718bfa7aecff913aa350a2f0b4e07e30577 Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Mon, 25 Feb 2019 19:10:11 -0800 Subject: [PATCH] Adding ansible task for installing/running with docker. --- Docker.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Docker.md b/Docker.md index 6aa54d8..bd46e27 100644 --- a/Docker.md +++ b/Docker.md @@ -100,6 +100,31 @@ sudo docker pull linuxserver/radarr sudo systemctl restart docker-radarr ``` +# Using Ansible +Ansible provides a simple module to manage docker containers. Here's a simple task that can get Radarr running. + +``` +- name: radarr container + docker_container: + name: radarr + image: linuxserver/radarr:0.2.0.1316-ls4 + state: started + restart_policy: unless-stopped + published_ports: + - "7878:7878" + env: + TZ: America/Los_Angeles + PGID: 118 + PUID: 1000 + volumes: + - /host/config:/config + - /host/movies:/movies + - /host/downloads:/downloads +``` + +PGID and PUID are the group and user id to run the container under. + + # Advanced ## Automate Docker Image Update If you want to automate this, you can use the following script (let it run with a systemd timer):