Skip to content

Commit

Permalink
Merge pull request #60 from linuxserver/runtime/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Roxedus authored Jul 13, 2021
2 parents 65d1af1 + 1183787 commit b72f3ae
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fi
echo "**** External trigger running off of develop branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_LIDARR_DEVELOP\". ****"
echo "**** Retrieving external version ****"
EXT_RELEASE=$(curl -s "https://lidarr.servarr.com/v1/update/develop/changes?os=linux" | jq -r '. | .[0].version')
EXT_RELEASE=$(curl -s "https://lidarr.servarr.com/v1/update/develop/changes?runtime=netcore%26os=linux" | jq -r '. | .[0].version')
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****"
FAILURE_REASON="Can't retrieve external version for lidarr branch develop"
Expand Down
48 changes: 24 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ ARG LIDARR_BRANCH="develop"
ENV XDG_CONFIG_HOME="/config/xdg"

RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
jq \
libicu60 && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?os=linux" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=x64" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
jq \
libicu60 && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linux" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=x64" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*

# copy local files
COPY root/ /
Expand Down
48 changes: 24 additions & 24 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ ARG LIDARR_BRANCH="develop"
ENV XDG_CONFIG_HOME="/config/xdg"

RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
jq \
libicu60 && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?os=linux" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=arm64" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
jq \
libicu60 && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linux" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=arm64" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*

# copy local files
COPY root/ /
Expand Down
48 changes: 24 additions & 24 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ ARG LIDARR_BRANCH="develop"
ENV XDG_CONFIG_HOME="/config/xdg"

RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
jq \
libicu60 && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?os=linux" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=arm" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
jq \
libicu60 && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linux" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=arm" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*

# copy local files
COPY root/ /
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pipeline {
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
JSON_URL = 'https://lidarr.servarr.com/v1/update/develop/changes?os=linux'
JSON_URL = 'https://lidarr.servarr.com/v1/update/develop/changes?runtime=netcore%26os=linux'
JSON_PATH = '.[0].version'
BUILD_VERSION_ARG = 'LIDARR_RELEASE'
LS_USER = 'linuxserver'
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ Special Note: Following our current folder structure will result in an inability

Another item to keep in mind, is that within lidarr itself, you should then map your download client folder to your lidarr folder: Settings -> Download Client -> advanced -> remote path mappings. I input the host of my download client (matches the download client defined) remote path is /downloads/Music (relative to the internal container path) and local path is /media/downloads/completed/Music, assuming you have folders to seperate your downloaded data types.

### Media folders

We have set `/music` and `/downloads` as ***optional paths***, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content.

Use the optional paths if you dont understand, or dont want hardlinks/atomic moves.

The folks over at servarr.com wrote a good [write-up](https://wiki.servarr.com/docker-guide#consistent-and-well-planned-paths) on how to get started with this.

## Usage

Here are some example snippets to help you get started creating a container.
Expand All @@ -93,8 +101,8 @@ services:
- TZ=Europe/London
volumes:
- /path/to/appdata/config:/config
- /path/to/music:/music
- /path/to/downloads:/downloads
- /path/to/music:/music #optional
- /path/to/downloads:/downloads #optional
ports:
- 8686:8686
restart: unless-stopped
Expand All @@ -110,8 +118,8 @@ docker run -d \
-e TZ=Europe/London \
-p 8686:8686 \
-v /path/to/appdata/config:/config \
-v /path/to/music:/music \
-v /path/to/downloads:/downloads \
-v /path/to/music:/music `#optional` \
-v /path/to/downloads:/downloads `#optional` \
--restart unless-stopped \
ghcr.io/linuxserver/lidarr
```
Expand Down Expand Up @@ -239,7 +247,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **25.01.21:** - Publish `develop` tag.
* **11.07.21:** - Make the paths clearer to the user.
* **20.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information.
* **27.09.20:** - Move preview branch/tag to nightly.
* **05.04.20:** - Move app to /app.
Expand Down
3 changes: 1 addition & 2 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---

# jenkins variables
project_name: docker-lidarr
external_type: custom_json
release_type: prerelease
release_tag: develop
ls_branch: develop
repo_vars:
- JSON_URL = 'https://lidarr.servarr.com/v1/update/develop/changes?os=linux'
- JSON_URL = 'https://lidarr.servarr.com/v1/update/develop/changes?runtime=netcore%26os=linux'
- JSON_PATH = '.[0].version'
- BUILD_VERSION_ARG = 'LIDARR_RELEASE'
- LS_USER = 'linuxserver'
Expand Down
12 changes: 11 additions & 1 deletion readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ opt_param_usage_include_env: false
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Configuration files for Lidarr." }
opt_param_usage_include_vols: true
opt_param_volumes:
- { vol_path: "/music", vol_host_path: "/path/to/music", desc: "Music files (See note in Application setup)." }
- { vol_path: "/downloads", vol_host_path: "/path/to/downloads", desc: "Path to your download folder for music (See note in Application setup)." }
param_usage_include_ports: true
Expand All @@ -46,10 +48,18 @@ app_setup_block: |
Special Note: Following our current folder structure will result in an inability to hardlink from your downloads to your Music folder because they are on seperate volumes. To support hardlinking, simply ensure that the Music and downloads data are on a single volume. For example, if you have /mnt/storage/Music and /mnt/storage/downloads/completed/Music, you would want something like /mnt/storage:/media for your volume. Then you can hardlink from /media/downloads/completed to /media/Music.
Another item to keep in mind, is that within lidarr itself, you should then map your download client folder to your lidarr folder: Settings -> Download Client -> advanced -> remote path mappings. I input the host of my download client (matches the download client defined) remote path is /downloads/Music (relative to the internal container path) and local path is /media/downloads/completed/Music, assuming you have folders to seperate your downloaded data types.
### Media folders
We have set `/music` and `/downloads` as ***optional paths***, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content.
Use the optional paths if you dont understand, or dont want hardlinks/atomic moves.
The folks over at servarr.com wrote a good [write-up](https://wiki.servarr.com/docker-guide#consistent-and-well-planned-paths) on how to get started with this.
# changelog
changelogs:
- { date: "25.01.21:", desc: "Publish `develop` tag." }
- { date: "11.07.21:", desc: "Make the paths clearer to the user." }
- { date: "20.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information." }
- { date: "27.09.20:", desc: "Move preview branch/tag to nightly." }
- { date: "05.04.20:", desc: "Move app to /app." }
Expand Down
2 changes: 1 addition & 1 deletion root/etc/cont-init.d/30-config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# permissions
chown -R abc:abc \
/config
/config
8 changes: 4 additions & 4 deletions root/etc/services.d/lidarr/run
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/with-contenv bash

if [ -n "${UMASK_SET}" ] && [ -z "${UMASK}" ]; then
echo -e "You are using a legacy method of defining umask\nplease update your environment variable from UMASK_SET to UMASK\nto keep the functionality after July 2021"
umask ${UMASK_SET}
echo -e "You are using a legacy method of defining umask\nplease update your environment variable from UMASK_SET to UMASK\nto keep the functionality after July 2021"
umask ${UMASK_SET}
fi

exec \
s6-setuidgid abc /app/lidarr/bin/Lidarr \
-nobrowser -data=/config
s6-setuidgid abc /app/lidarr/bin/Lidarr \
-nobrowser -data=/config

0 comments on commit b72f3ae

Please sign in to comment.