Merge pull request #17 from sparklyballs/xenial

Xenial
This commit is contained in:
sparklyballs 2016-08-05 08:22:33 +01:00 committed by GitHub
commit ef4e5d70bd
8 changed files with 54 additions and 42 deletions

View File

@ -1,10 +0,0 @@
sudo: false
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
script:
- shellcheck --version
- find . -type f -name '*.sh' | while read file; do echo "Linting $file"; shellcheck $file || exit 1; done

View File

@ -1,23 +1,30 @@
FROM linuxserver/baseimage
MAINTAINER Stian Larsen <lonixx@gmail.com>
FROM lsiobase/xenial
MAINTAINER sparklyballs
ENV APTLIST="libmono-cil-dev python nzbdrone"
# set environment variables
ARG DEBIAN_FRONTEND="noninteractive"
# Configure nzbdrone's apt repository
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC && \
echo "deb http://apt.sonarr.tv/ master main" > /etc/apt/sources.list.d/sonarr.list && \
apt-get update -q && \
apt-get install $APTLIST -qy && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# add sonarr repository
RUN \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC && \
echo "deb http://apt.sonarr.tv/ master main" > \
/etc/apt/sources.list.d/sonarr.list && \
# install packages
apt-get update && \
apt-get install -y \
nzbdrone && \
#Adding Custom files
ADD init/ /etc/my_init.d/
ADD services/ /etc/service/
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
# cleanup
apt-get clean && \
rm -rfv \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
#Ports and Volumes
# add local files
COPY root/ /
# ports and volumes
VOLUME /config /downloads /tv
EXPOSE 8989

View File

@ -1,6 +1,9 @@
![https://linuxserver.io](https://www.linuxserver.io/wp-content/uploads/2015/06/linuxserver_medium.png)
The [LinuxServer.io](https://linuxserver.io) team brings you another quality container release featuring auto-update on startup, easy user mapping and community support. Be sure to checkout our [forums](https://forum.linuxserver.io) or for real-time support our [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`.
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring easy user mapping and community support. Find us for support at:
* [forum.linuxserver.io](https://forum.linuxserver.io)
* [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`
* [Podcast](https://www.linuxserver.io/index.php/category/podcast/) covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
# linuxserver/sonarr
@ -18,30 +21,37 @@ docker create \
-v /dev/rtc:/dev/rtc:ro \
-v </path/to/appdata>:/config \
-v <path/to/tvseries>:/tv \
-v <path/to/downloadclient-downloads>:/downloads \
-v <path/to/downloadclient-downloads>:/downloads \
linuxserver/sonarr
```
**Parameters**
* `-p 8989` - the port sonarr webinterface
* `-v /dev/rtc:/dev/rtc:ro` - map hwclock to the docker hwclock as ReadOnly (mono throws exeptions otherwise)
* `-v /dev/rtc:/dev/rtc:ro` - map hwclock as ReadOnly (mono throws exceptions otherwise)
* `-v /config` - database and sonarr configs
* `-v /tv` - location of TV library on disk
* `-e PGID` for for GroupID - see below for explanation
* `-e PUID` for for UserID - see below for explanation
It is based on ubuntu xenial with S6 overlay, for shell access whilst the container is running do `docker exec -it sonarr /bin/bash`.
### User / Group Identifiers
**TL;DR** - The `PGID` and `PUID` values set the user / group you'd like your container to 'run as' to the host OS. This can be a user you've created or even root (not recommended).
Sometimes when using data volumes (`-v` flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user `PUID` and group `PGID`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" <sup>TM</sup>.
Part of what makes our containers work so well is by allowing you to specify your own `PUID` and `PGID`. This avoids nasty permissions errors with relation to data volumes (`-v` flags). When an application is installed on the host OS it is normally added to the common group called users, Docker apps due to the nature of the technology can't be added to this group. So we added this feature to let you easily choose when running your containers.
In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below:
## Updates / Monitoring
```
$ id <dockeruser>
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
```
## Info
* Upgrade to the latest version of sonarr simply `docker restart sonarr`.
* Monitor the logs of the container in realtime `docker logs -f sonarr`.
## Changelog
+ **31.08.2015:** Cleanup, changed sources to fetch binarys from. also a new baseimage.
+ **20.07.16:** Rebase to xenial.
+ **31.08.15:** Cleanup, changed sources to fetch binarys from. also a new baseimage.

View File

@ -1,2 +0,0 @@
#!/bin/bash
if [ -f /config/nzbdrone.pid ]; then rm -r /config/nzbdrone.pid; fi

View File

@ -1,3 +0,0 @@
#!/bin/bash
chown -R abc:abc /opt/NzbDrone

View File

@ -0,0 +1,8 @@
#!/usr/bin/with-contenv bash
# cleanup pid if it exists
[[ -e /config/nzbdrone.pid ]] && rm -rf /config/nzbdrone.pid
# permissions
chown -R abc:abc /opt/NzbDrone

View File

@ -0,0 +1,5 @@
#!/usr/bin/with-contenv bash
umask 0002
XDG_CONFIG_HOME="/config/xdg" exec s6-setuidgid abc mono /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/config

View File

@ -1,3 +0,0 @@
#!/bin/bash
umask 0002
XDG_CONFIG_HOME="/config/xdg" exec /sbin/setuser abc mono /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/config