Compare commits

..

82 Commits

Author SHA1 Message Date
LinuxServer-CI
4a0a504a34 Bot Updating Package Versions 2019-05-08 14:25:15 -04:00
LinuxServer-CI
0547b54384 Bot Updating Templated Files 2019-05-05 01:30:06 +01:00
LinuxServer-CI
fa7b54bee8 Bot Updating Package Versions 2019-04-17 14:25:32 -04:00
LinuxServer-CI
55f8c46c52 Bot Updating Package Versions 2019-04-10 14:23:58 -04:00
LinuxServer-CI
422481832a Bot Updating Package Versions 2019-03-27 19:28:11 +00:00
aptalca
5769154b9f Merge pull request #70 from thelamer/master
Switching to new Base images, shift to arm32v7 tag.
2019-03-24 18:54:01 -04:00
thelamer
fbe8519f83 Switching to new Base images, shift to arm32v7 tag. 2019-03-23 21:48:54 -07:00
LinuxServer-CI
28a29c26fa Bot Updating Package Versions 2019-03-20 19:26:47 +00:00
LinuxServer-CI
7e348712e1 Bot Updating Templated Files 2019-03-13 15:21:43 -04:00
LinuxServer-CI
2157556965 Bot Updating Templated Files 2019-03-06 19:21:36 +00:00
LinuxServer-CI
1a52a0bdbf Bot Updating Package Versions 2019-02-27 19:23:53 +00:00
LinuxServer-CI
6ff8c0e9e7 Bot Updating Package Versions 2019-02-25 16:43:46 -05:00
j0nnymoe
cde2d19821 Merge pull request #69 from thelamer/master
Rebase to Alpine 3.9, add themes to baseimage, add python and findutil
2019-02-25 21:41:09 +00:00
thelamer
f740cde12d Rebase to Alpine 3.9, add themes to baseimage, add python and findutil 2019-02-24 21:35:29 -08:00
LinuxServer-CI
c19cc1b923 Bot Updating Package Versions 2019-02-23 03:19:17 -05:00
Ryan Kuba
1116446b1f Merge pull request #43 from linuxserver/stop
Stop transmission cleanly, fix cron start
2019-02-23 00:12:30 -08:00
Ryan Kuba
1f01fffa23 Merge branch 'master' into stop 2019-02-23 00:02:34 -08:00
thelamer
21343cd6be update to new readme format 2019-02-23 00:00:49 -08:00
j0nnymoe
47aef25ee2 Merge pull request #67 from thelamer/master
adding dynamic readme
2019-02-12 14:36:18 +00:00
thelamer
249c717320 adding dynamic readme 2019-02-11 20:01:02 -08:00
LinuxServer-CI
19c0094746 Bot Updating Package Versions 2019-02-11 13:27:53 -05:00
LinuxServer-CI
77ee400d52 Bot Updating Templated Files 2019-02-11 18:25:55 +00:00
aptalca
f089e1b0f5 Merge pull request #66 from linuxserver/pipeline
adding pipeline logic and multi arching
2019-02-11 13:25:20 -05:00
thelamer
e950030813 adding pipeline logic and multi arching 2019-02-07 18:47:43 -08:00
sparklyballs
ad5f6ecfaa Merge pull request #60 from linuxserver/rebase_alpine_3.8
rebase to alpine 3.8, don't need to pull from edge
2018-08-15 21:59:30 +01:00
sparklyballs
9f73545a49 rebase to alpine 3.8, don't need to pull from edge 2018-08-15 21:11:21 +01:00
sparklyballs
14ced70888 Merge pull request #48 from linuxserver/edge_repo_for_transmission
use edge repo for transmission
2018-02-12 19:19:48 +00:00
sparklyballs
4302df7270 use edge repo for transmission 2018-02-12 16:02:09 +00:00
sparklyballs
2a202a800f Merge pull request #47 from linuxserver/bump_alpine_3.7
bump alpine 3.7
2018-01-10 15:32:26 +00:00
sparklyballs
227da52355 bump alpine 3.7 2018-01-10 11:16:55 +00:00
aptalca
1dd1795b69 Update README.md 2017-11-24 02:44:14 -05:00
aptalca
3ca740ca1d fix cron start 2017-11-24 02:40:46 -05:00
aptalca
5accb4b55b trap SIGTERM and clean stop 2017-11-24 02:40:08 -05:00
j0nnymoe
8fc46f45ec Merge pull request #38 from linuxserver/rsync
Add rsync package
2017-07-31 08:52:20 +01:00
aptalca
0461071b92 Update README.md 2017-07-25 11:38:25 -04:00
aptalca
9fb8dcd358 add rsync 2017-07-25 11:37:34 -04:00
sparklyballs
328068e20d update of README with badges for new ci 2017-07-12 01:16:00 +01:00
j0nnymoe
9091730d00 Merge pull request #35 from linuxserver/alpine_3.6
bump to alpine 3.6
2017-05-27 09:38:15 +01:00
sparklyballs
4246f944d6 bump to alpine 3.6 2017-05-27 00:25:33 +01:00
sparklyballs
b4e526cedf fix formatting markdown README 2017-03-15 17:42:28 +00:00
sparklyballs
f0c27ab450 Merge pull request #30 from patsissons/patch-1
add openssl to installed packages
2017-03-04 12:13:51 +00:00
Pat Sissons
244f5c6810 add openssl to installed packages
openssl is required for the blocklist updater script to support https uri's.
resolves #29
2017-02-27 11:22:02 -08:00
Neil
d22fdb48dc Merge pull request #25 from linuxserver/3.5
rebase to alpine 3.5
2017-02-06 17:29:05 +00:00
sparklyballs
97dfe76a57 rebase to alpine 3.5 2017-02-06 17:00:43 +00:00
sparklyballs
76293d786a fix spacing one of headers 2017-01-16 13:00:59 +00:00
Neil
1f0f18517d Merge pull request #23 from linuxserver/unpackers
add p7zip, tar , unrar and unzip packages
2017-01-15 22:31:19 +00:00
sparklyballs
f505697081 add p7zip, tar , unrar and unzip packages 2017-01-15 22:12:38 +00:00
sparklyballs
d9420323ac add p7zip, tar , unrar and unzip packages 2017-01-15 22:08:31 +00:00
sparklyballs
5138709d55 Merge pull request #18 from phendryx/blocklist-cleanup
Blocklist script cleanup
2016-11-10 05:01:51 +00:00
Paul Hendryx
f7490f4fd7 full path to settings.json 2016-11-03 07:12:13 -04:00
Paul Hendryx
6bad2d716e replace & with &, static filename output for wget 2016-11-02 10:04:54 -04:00
Paul Hendryx
72c8df500e working script from container 2016-11-02 09:39:55 -04:00
Paul Hendryx
a1b5353ea2 fixed update script 2016-11-02 09:38:19 -04:00
sparklyballs
96a625b9cd Merge pull request #16 from phendryx/blocklist-update
Blocklist update
2016-10-30 13:30:10 +00:00
Paul Hendryx
90510c1308 change update script to download blocklist, decompress, restart service. no auth required. 2016-10-19 09:34:04 -04:00
Paul Hendryx
401a469bb8 add newline 2016-10-18 08:53:43 -04:00
Paul Hendryx
8d7f56dcde dockerfile cleanup 2016-10-18 08:53:19 -04:00
Paul Hendryx
c3e2acd4c9 readme version entry 2016-10-18 08:53:15 -04:00
Paul Hendryx
4f5055dc4a blocklist w/ cron 2016-10-18 08:53:05 -04:00
sparklyballs
2329699f53 fix date separator 2016-10-18 03:05:37 +01:00
sparklyballs
8538165d17 add extra parameters info 2016-10-17 23:54:40 +01:00
sparklyballs
d322a13696 add version layer information 2016-10-14 15:27:26 +01:00
sparklyballs
33589b220f update media links README 2016-10-07 10:36:30 +01:00
sparklyballs
3da388bba1 update image link 2016-10-05 12:20:02 +01:00
sparklyballs
fcd4c32ba5 Merge pull request #12 from sparklyballs/readme-password
Readme password
2016-09-23 17:41:44 +01:00
sparklyballs
e97bd50b83 add info about securing webui to setting up application section 2016-09-23 17:13:05 +01:00
sparklyballs
ad91ae6396 add info about securing webui to setting up application section 2016-09-23 17:11:44 +01:00
sparklyballs
eecebfb5c2 add info about securing webui to setting up application section 2016-09-23 17:11:02 +01:00
sparklyballs
6c1e5e273a add info about securing webui to setting up application section 2016-09-23 17:08:39 +01:00
sparklyballs
3420cab227 add info about securing webui to setting up application section 2016-09-23 17:07:03 +01:00
aptalca
39909f7c4b Merge pull request #11 from sparklyballs/add-curl
add curl package per LT support thread
2016-09-21 12:56:43 -04:00
sparklyballs
9253db127d add curl package per LT support thread 2016-09-21 09:09:40 +01:00
sparklyballs
44c007bebb add .ignores and templates 2016-09-17 03:07:06 +01:00
sparklyballs
f310f9de7a Merge pull request #10 from sparklyballs/microbadger
add layer badge to README
2016-09-09 21:58:05 +01:00
sparklyballs
044d7fc580 add layer badge to README 2016-09-09 21:55:25 +01:00
sparklyballs
29d0edf931 Merge pull request #9 from sparklyballs/badges
Badges
2016-08-28 01:32:48 +01:00
sparklyballs
4a478efa62 add badges to README 2016-08-28 01:31:17 +01:00
sparklyballs
3142aea0d1 add badges to README 2016-08-28 01:29:02 +01:00
sparklyballs
48b367cb91 Merge pull request #5 from sparklyballs/alpine
rebase to alpine
2016-08-09 10:52:44 +01:00
sparklyballs
1365022454 Add image to README 2016-08-09 10:51:42 +01:00
sparklyballs
037c87a002 tidy up Dockerfile, init and services files spruce up README 2016-08-09 10:40:46 +01:00
sparklyballs
c3b8ed7c83 rebase to alpine 2016-07-01 09:46:34 +01:00
21 changed files with 1377 additions and 61 deletions

6
.dockerignore Normal file
View File

@@ -0,0 +1,6 @@
.git
.gitignore
.github
.gitattributes
READMETEMPLATE.md
README.md

17
.gitattributes vendored Normal file
View File

@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

21
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,21 @@
<!--- Provide a general summary of the issue in the Title above -->
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- If you have an issue with the project, please provide us with the following information -->
<!--- Host OS -->
<!--- Command line users, your run/create command, GUI/Unraid users, a screenshot of your template settings. -->
<!--- Docker log output, docker log <container-name> -->
<!--- Mention if you're using symlinks on any of the volume mounts. -->
<!--- If you have a suggestion or fix for the project, please provide us with the following information -->
<!--- What you think your suggestion brings to the project, or fixes with the project -->
<!--- If it's a fix, would it be better suited as a Pull request to the repo ? -->
## Thanks, team linuxserver.io

15
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,15 @@
<!--- Provide a general summary of your changes in the Title above -->
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- Before submitting a pull request please check the following -->
<!--- That you have made a branch in your fork, we'd rather not merge from your master -->
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
<!--- -->
## Thanks, team linuxserver.io

43
.gitignore vendored Normal file
View File

@@ -0,0 +1,43 @@
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# =========================
# Operating System Files
# =========================
# OSX
# =========================
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

View File

@@ -1,26 +1,51 @@
FROM linuxserver/baseimage
FROM lsiobase/alpine:3.9
MAINTAINER Sparklyballs <sparklyballs@linuxserver.io>
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
ENV APTLIST="transmission-daemon"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
findutils \
jq \
openssl \
p7zip \
python \
rsync \
tar \
transmission-cli \
transmission-daemon \
unrar \
unzip && \
echo "**** install third party themes ****" && \
curl -o \
/tmp/combustion.zip -L \
"https://github.com/Secretmapper/combustion/archive/release.zip" && \
unzip \
/tmp/combustion.zip -d \
/ && \
mkdir -p /tmp/twctemp && \
TWCVERSION=$(curl -sX GET "https://api.github.com/repos/ronggang/transmission-web-control/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o \
/tmp/twc.tar.gz -L \
"https://github.com/ronggang/transmission-web-control/archive/${TWCVERSION}.tar.gz" && \
tar xf \
/tmp/twc.tar.gz -C \
/tmp/twctemp --strip-components=1 && \
mv /tmp/twctemp/src /transmission-web-control && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# add repository
RUN add-apt-repository ppa:transmissionbt/ppa && \
# install packages
apt-get update -q && \
apt-get install $APTLIST -qy && \
# copy local files
COPY root/ /
# cleanup
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
#Adding Custom files
ADD init/ /etc/my_init.d/
ADD services/ /etc/service/
#ADD cron/ /etc/cron.d/
ADD defaults/ /defaults/
RUN chmod -v +x /etc/service/*/run && chmod -v +x /etc/my_init.d/*.sh
# Volumes and Ports
VOLUME /config /downloads /watch
# ports and volumes
EXPOSE 9091 51413
VOLUME /config /downloads /watch

51
Dockerfile.aarch64 Normal file
View File

@@ -0,0 +1,51 @@
FROM lsiobase/alpine:arm64v8-3.9
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
findutils \
jq \
openssl \
p7zip \
python \
rsync \
tar \
transmission-cli \
transmission-daemon \
unrar \
unzip && \
echo "**** install third party themes ****" && \
curl -o \
/tmp/combustion.zip -L \
"https://github.com/Secretmapper/combustion/archive/release.zip" && \
unzip \
/tmp/combustion.zip -d \
/ && \
mkdir -p /tmp/twctemp && \
TWCVERSION=$(curl -sX GET "https://api.github.com/repos/ronggang/transmission-web-control/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o \
/tmp/twc.tar.gz -L \
"https://github.com/ronggang/transmission-web-control/archive/${TWCVERSION}.tar.gz" && \
tar xf \
/tmp/twc.tar.gz -C \
/tmp/twctemp --strip-components=1 && \
mv /tmp/twctemp/src /transmission-web-control && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 9091 51413
VOLUME /config /downloads /watch

51
Dockerfile.armhf Normal file
View File

@@ -0,0 +1,51 @@
FROM lsiobase/alpine:arm32v7-3.9
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
findutils \
jq \
openssl \
p7zip \
python \
rsync \
tar \
transmission-cli \
transmission-daemon \
unrar \
unzip && \
echo "**** install third party themes ****" && \
curl -o \
/tmp/combustion.zip -L \
"https://github.com/Secretmapper/combustion/archive/release.zip" && \
unzip \
/tmp/combustion.zip -d \
/ && \
mkdir -p /tmp/twctemp && \
TWCVERSION=$(curl -sX GET "https://api.github.com/repos/ronggang/transmission-web-control/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o \
/tmp/twc.tar.gz -L \
"https://github.com/ronggang/transmission-web-control/archive/${TWCVERSION}.tar.gz" && \
tar xf \
/tmp/twc.tar.gz -C \
/tmp/twctemp --strip-components=1 && \
mv /tmp/twctemp/src /transmission-web-control && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 9091 51413
VOLUME /config /downloads /watch

658
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,658 @@
pipeline {
agent {
label 'X86-64-MULTI'
}
// Input to determine if this is a package check
parameters {
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
}
// Configuration for the variables used for this specific repo
environment {
BUILDS_DISCORD=credentials('build_webhook_url')
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
BUILD_VERSION_ARG = 'TRANSMISSION_VERSION'
LS_USER = 'linuxserver'
LS_REPO = 'docker-transmission'
CONTAINER_NAME = 'transmission'
DOCKERHUB_IMAGE = 'linuxserver/transmission'
DEV_DOCKERHUB_IMAGE = 'lsiodev/transmission'
PR_DOCKERHUB_IMAGE = 'lspipepr/transmission'
DIST_IMAGE = 'alpine'
MULTIARCH='true'
CI='true'
CI_WEB='true'
CI_PORT='9091'
CI_SSL='false'
CI_DELAY='120'
CI_DOCKERENV='TZ=US/Pacific'
CI_AUTH='user:password'
CI_WEBPATH=''
}
stages {
// Setup all the basic environment variables needed for the build
stage("Set ENV Variables base"){
steps{
script{
env.EXIT_STATUS = ''
env.LS_RELEASE = sh(
script: '''docker run --rm alexeiled/skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
returnStdout: true).trim()
env.LS_RELEASE_NOTES = sh(
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
returnStdout: true).trim()
env.GITHUB_DATE = sh(
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
returnStdout: true).trim()
env.COMMIT_SHA = sh(
script: '''git rev-parse HEAD''',
returnStdout: true).trim()
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
}
script{
env.LS_RELEASE_NUMBER = sh(
script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''',
returnStdout: true).trim()
}
script{
env.LS_TAG_NUMBER = sh(
script: '''#! /bin/bash
tagsha=$(git rev-list -n 1 ${LS_RELEASE} 2>/dev/null)
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
echo ${LS_RELEASE_NUMBER}
elif [ -z "${GIT_COMMIT}" ]; then
echo ${LS_RELEASE_NUMBER}
else
echo $((${LS_RELEASE_NUMBER} + 1))
fi''',
returnStdout: true).trim()
}
}
}
/* #######################
Package Version Tagging
####################### */
// Grab the current package versions in Git to determine package tag
stage("Set Package tag"){
steps{
script{
env.PACKAGE_TAG = sh(
script: '''#!/bin/bash
if [ -e package_versions.txt ] ; then
cat package_versions.txt | md5sum | cut -c1-8
else
echo none
fi''',
returnStdout: true).trim()
}
}
}
/* ########################
External Release Tagging
######################## */
// If this is a custom command to determine version use that command
stage("Set tag custom bash"){
steps{
script{
env.EXT_RELEASE = sh(
script: ''' curl -s http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/ |awk -F '(transmission-cli-|.apk)' '/transmission-cli.*.apk/ {print $2}' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}
}
}
// Sanitize the release tag and strip illegal docker or github characters
stage("Sanitize tag"){
steps{
script{
env.EXT_RELEASE_CLEAN = sh(
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
returnStdout: true).trim()
}
}
}
// If this is a master build use live docker endpoints
stage("Set ENV live build"){
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
}
steps {
script{
env.IMAGE = env.DOCKERHUB_IMAGE
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
}
}
// If this is a dev build use dev docker endpoints
stage("Set ENV dev build"){
when {
not {branch "master"}
environment name: 'CHANGE_ID', value: ''
}
steps {
script{
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
}
}
}
// If this is a pull request build use dev docker endpoints
stage("Set ENV PR build"){
when {
not {environment name: 'CHANGE_ID', value: ''}
}
steps {
script{
env.IMAGE = env.PR_DOCKERHUB_IMAGE
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
}
}
}
// Run ShellCheck
stage('ShellCheck') {
when {
environment name: 'CI', value: 'true'
}
steps {
withCredentials([
string(credentialsId: 'spaces-key', variable: 'DO_KEY'),
string(credentialsId: 'spaces-secret', variable: 'DO_SECRET')
]) {
script{
env.SHELLCHECK_URL = 'https://lsio-ci.ams3.digitaloceanspaces.com/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml'
}
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
sh '''#! /bin/bash
set -e
docker pull lsiodev/spaces-file-upload:latest
docker run --rm \
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
-e FILE_NAME="shellcheck-result.xml" \
-e MIMETYPE="text/xml" \
-v ${WORKSPACE}:/mnt \
-e SECRET_KEY=\"${DO_SECRET}\" \
-e ACCESS_KEY=\"${DO_KEY}\" \
-t lsiodev/spaces-file-upload:latest \
python /upload.py'''
}
}
}
// Use helper containers to render templated files
stage('Update-Templates') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
}
}
steps {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
docker pull linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
docker pull linuxserver/doc-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/readme linuxserver/doc-builder:latest
if [ "$(md5sum ${TEMPDIR}/${LS_REPO}/Jenkinsfile | awk '{ print $1 }')" != "$(md5sum Jenkinsfile | awk '{ print $1 }')" ] || [ "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/README.md | awk '{ print $1 }')" != "$(md5sum README.md | awk '{ print $1 }')" ]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git checkout -f master
cp ${TEMPDIR}/${CONTAINER_NAME}/README.md ${TEMPDIR}/repo/${LS_REPO}/
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
cd ${TEMPDIR}/repo/${LS_REPO}/
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git add Jenkinsfile README.md
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git commit -m 'Bot Updating Templated Files'
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
fi
mkdir -p ${TEMPDIR}/gitbook
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
cp ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
cd ${TEMPDIR}/gitbook/docker-documentation/
git add images/docker-${CONTAINER_NAME}.md
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
fi
rm -Rf ${TEMPDIR}'''
script{
env.FILES_UPDATED = sh(
script: '''cat /tmp/${COMMIT_SHA}-${BUILD_NUMBER}''',
returnStdout: true).trim()
}
}
}
// Exit the build if the Templated files were just updated
stage('Template-exit') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'FILES_UPDATED', value: 'true'
expression {
env.CONTAINER_NAME != null
}
}
steps {
script{
env.EXIT_STATUS = 'ABORTED'
}
}
}
/* ###############
Build Container
############### */
// Build Docker container for push to LS Repo
stage('Build-Single') {
when {
environment name: 'MULTIARCH', value: 'false'
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
// Build MultiArch Docker containers for push to LS Repo
stage('Build-Multi') {
when {
environment name: 'MULTIARCH', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
parallel {
stage('Build X86') {
steps {
sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
stage('Build ARMHF') {
agent {
label 'ARMHF'
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
echo 'Logging into DockerHub'
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
sh "docker push lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
sh '''docker rmi \
${IMAGE}:arm32v7-${META_TAG} \
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
}
}
}
stage('Build ARM64') {
agent {
label 'ARM64'
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
echo 'Logging into DockerHub'
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
sh "docker push lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
sh '''docker rmi \
${IMAGE}:arm64v8-${META_TAG} \
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
}
}
}
}
}
// Take the image we just built and dump package versions for comparison
stage('Update-packages') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
if [ "${MULTIARCH}" == "true" ]; then
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
else
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
fi
if [ "${DIST_IMAGE}" == "alpine" ]; then
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
apk info -v > /tmp/package_versions.txt && \
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
chmod 777 /tmp/package_versions.txt'
elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
chmod 777 /tmp/package_versions.txt'
fi
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
cd ${TEMPDIR}/${LS_REPO}/
wait
git add package_versions.txt
git commit -m 'Bot Updating Package Versions'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
echo "Package tag updated, stopping build process"
else
echo "false" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
echo "Package tag is same as previous continue with build process"
fi
rm -Rf ${TEMPDIR}'''
script{
env.PACKAGE_UPDATED = sh(
script: '''cat /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}''',
returnStdout: true).trim()
}
}
}
// Exit the build if the package file was just updated
stage('PACKAGE-exit') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
script{
env.EXIT_STATUS = 'ABORTED'
}
}
}
// Exit the build if this is just a package check and there are no changes to push
stage('PACKAGECHECK-exit') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'false'
environment name: 'EXIT_STATUS', value: ''
expression {
params.PACKAGE_CHECK == 'true'
}
}
steps {
script{
env.EXIT_STATUS = 'ABORTED'
}
}
}
/* #######
Testing
####### */
// Run Container tests
stage('Test') {
when {
environment name: 'CI', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
string(credentialsId: 'spaces-key', variable: 'DO_KEY'),
string(credentialsId: 'spaces-secret', variable: 'DO_SECRET')
]) {
script{
env.CI_URL = 'https://lsio-ci.ams3.digitaloceanspaces.com/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
}
sh '''#! /bin/bash
set -e
docker pull lsiodev/ci:latest
if [ "${MULTIARCH}" == "true" ]; then
docker pull lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-e IMAGE=\"${IMAGE}\" \
-e DELAY_START=\"${CI_DELAY}\" \
-e TAGS=\"${CI_TAGS}\" \
-e META_TAG=\"${META_TAG}\" \
-e PORT=\"${CI_PORT}\" \
-e SSL=\"${CI_SSL}\" \
-e BASE=\"${DIST_IMAGE}\" \
-e SECRET_KEY=\"${DO_SECRET}\" \
-e ACCESS_KEY=\"${DO_KEY}\" \
-e DOCKER_ENV=\"${CI_DOCKERENV}\" \
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
-e WEB_AUTH=\"${CI_AUTH}\" \
-e WEB_PATH=\"${CI_WEBPATH}\" \
-e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \
-t lsiodev/ci:latest \
python /ci/ci.py'''
}
}
}
/* ##################
Release Logic
################## */
// If this is an amd64 only image only push a single image
stage('Docker-Push-Single') {
when {
environment name: 'MULTIARCH', value: 'false'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
echo 'Logging into DockerHub'
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:latest"
sh "docker push ${IMAGE}:latest"
sh "docker push ${IMAGE}:${META_TAG}"
sh '''docker rmi \
${IMAGE}:${META_TAG} \
${IMAGE}:latest || :'''
}
}
}
// If this is a multi arch release push all images and define the manifest
stage('Docker-Push-Multi') {
when {
environment name: 'MULTIARCH', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh '''#! /bin/bash
if [ "${CI}" == "false" ]; then
docker pull lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi'''
sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-latest"
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm32v7-latest"
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-latest"
sh "docker push ${IMAGE}:amd64-${META_TAG}"
sh "docker push ${IMAGE}:arm32v7-${META_TAG}"
sh "docker push ${IMAGE}:arm64v8-${META_TAG}"
sh "docker push ${IMAGE}:amd64-latest"
sh "docker push ${IMAGE}:arm32v7-latest"
sh "docker push ${IMAGE}:arm64v8-latest"
sh "docker manifest push --purge ${IMAGE}:latest || :"
sh "docker manifest create ${IMAGE}:latest ${IMAGE}:amd64-latest ${IMAGE}:arm32v7-latest ${IMAGE}:arm64v8-latest"
sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm32v7-latest --os linux --arch arm"
sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8"
sh "docker manifest push --purge ${IMAGE}:${META_TAG} || :"
sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}"
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v7-${META_TAG} --os linux --arch arm"
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8"
sh "docker manifest push --purge ${IMAGE}:latest"
sh "docker manifest push --purge ${IMAGE}:${META_TAG}"
sh '''docker rmi \
${IMAGE}:amd64-${META_TAG} \
${IMAGE}:amd64-latest \
${IMAGE}:arm32v7-${META_TAG} \
${IMAGE}:arm32v7-latest \
${IMAGE}:arm64v8-${META_TAG} \
${IMAGE}:arm64v8-latest \
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
}
}
}
// If this is a public release tag it in the LS Github
stage('Github-Tag-Push-Release') {
when {
branch "master"
expression {
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
echo "Pushing New tag for current commit ${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}"
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
"type": "commit",\
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "master",\
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": false}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
}
}
// Use helper container to sync the current README on master to the dockerhub endpoint
stage('Sync-README') {
when {
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash
docker pull lsiodev/readme-sync
docker run --rm=true \
-e DOCKERHUB_USERNAME=$DOCKERUSER \
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
-e DOCKER_REPOSITORY=${IMAGE} \
-e GIT_BRANCH=master \
lsiodev/readme-sync bash -c 'node sync' '''
}
}
}
// If this is a Pull request send the CI link as a comment on it
stage('Pull Request Comment') {
when {
not {environment name: 'CHANGE_ID', value: ''}
environment name: 'CI', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/issues/${PULL_REQUEST}/comments \
-d '{"body": "I am a bot, here are the test results for this PR: \\n'${CI_URL}' \\n'${SHELLCHECK_URL}'"}' '''
}
}
}
/* ######################
Send status to Discord
###################### */
post {
always {
script{
if (env.EXIT_STATUS == "ABORTED"){
sh 'echo "build aborted"'
}
else if (currentBuild.currentResult == "SUCCESS"){
sh ''' curl -X POST --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
else {
sh ''' curl -X POST --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
}
}
}
}

245
README.md
View File

@@ -1,56 +1,239 @@
![https://linuxserver.io](http://www.linuxserver.io/wp-content/uploads/2015/06/linuxserver_medium.png)
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
The [LinuxServer.io](https://www.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/index.php) 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 :-
# linuxserver/transmission
* regular and timely application updates
* easy user mappings (PGID, PUID)
* custom base image with s6 overlay
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
* regular security updates
Find us at:
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
* [IRC](https://irc.linuxserver.io) - on freenode at `#linuxserver.io`. Our primary support channel is Discord.
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
# [linuxserver/transmission](https://github.com/linuxserver/docker-transmission)
[![](https://img.shields.io/discord/354974912613449730.svg?logo=discord&label=LSIO%20Discord&style=flat-square)](https://discord.gg/YWrKVTn)
[![](https://images.microbadger.com/badges/version/linuxserver/transmission.svg)](https://microbadger.com/images/linuxserver/transmission "Get your own version badge on microbadger.com")
[![](https://images.microbadger.com/badges/image/linuxserver/transmission.svg)](https://microbadger.com/images/linuxserver/transmission "Get your own version badge on microbadger.com")
![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/transmission.svg)
![Docker Stars](https://img.shields.io/docker/stars/linuxserver/transmission.svg)
[![Build Status](https://ci.linuxserver.io/buildStatus/icon?job=Docker-Pipeline-Builders/docker-transmission/master)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-transmission/job/master/)
[![](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/transmission/latest/badge.svg)](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/transmission/latest/index.html)
[Transmission](https://www.transmissionbt.com/) is designed for easy, powerful use. Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, µTP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more.
[![transmission](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/transmission.png)](https://www.transmissionbt.com/)
## Supported Architectures
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
Simply pulling `linuxserver/transmission` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
The architectures supported by this image are:
| Architecture | Tag |
| :----: | --- |
| x86-64 | amd64-latest |
| arm64 | arm64v8-latest |
| armhf | arm32v7-latest |
Transmission is designed for easy, powerful use. Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, µTP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more. [Transmission](http://www.transmissionbt.com/about/)
## Usage
Here are some example snippets to help you get started creating a container.
### docker
```
docker create --name=transmission \
-v /etc/localtime:/etc/localtime:ro \
-v <path to data>:/config \
-v <path to downloads>:/downloads \
-v <path to watch folder>:/watch \
-e PGID=<gid> -e PUID=<uid> \
-p 9091:9091 -p 51413:51413 -p 51413:51413/udp \
linuxserver/transmission
docker create \
--name=transmission \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-e TRANSMISSION_WEB_HOME=/combustion-release/ `#optional` \
-p 9091:9091 \
-p 51413:51413 \
-p 51413:51413/udp \
-v <path to data>:/config \
-v <path to downloads>:/downloads \
-v <path to watch folder>:/watch \
--restart unless-stopped \
linuxserver/transmission
```
**Parameters**
* `-p 9091`
* `-p 51413` - the port(s)
* `-v /etc/localtime` for timesync - *optional*
* `-v /config` - where transmission should store config files and logs
* `-v /downloads` - local path for downloads
* `-v /watch` - watch folder for torrent files
* `-e PGID` for GroupID - see below for explanation
* `-e PUID` for UserID - see below for explanation
### docker-compose
It is based on phusion-baseimage with ssh removed, for shell access whilst the container is running do `docker exec -it transmission /bin/bash`.
Compatible with docker-compose v2 schemas.
### User / Group Identifiers
```
---
version: "2"
services:
transmission:
image: linuxserver/transmission
container_name: transmission
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- TRANSMISSION_WEB_HOME=/combustion-release/ #optional
volumes:
- <path to data>:/config
- <path to downloads>:/downloads
- <path to watch folder>:/watch
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
restart: unless-stopped
```
**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).
## Parameters
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.
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
## Setting up the application
| Parameter | Function |
| :----: | --- |
| `-p 9091` | WebUI |
| `-p 51413` | Torrent Port TCP |
| `-p 51413/udp` | Torrent Port UDP |
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
| `-e TRANSMISSION_WEB_HOME=/combustion-release/` | Specify an alternative UI options are `/combustion-release/` and `/transmission-web-control/`. |
| `-v /config` | Where transmission should store config files and logs. |
| `-v /downloads` | Local path for downloads. |
| `-v /watch` | Watch folder for torrent files. |
## User / Group Identifiers
When using 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 any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
```
$ id username
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
```
&nbsp;
## Application Setup
Webui is on port 9091, the settings.json file in /config has extra settings not available in the webui. Stop the container before editing it or any changes won't be saved.
For users pulling an update and unable to access the webui setting you may need to set "rpc-host-whitelist-enabled": false, in /config/settings.json`
## Updates
If you choose to use transmission-web-control as your default UI, just note that the origional Web UI will not be available to you despite the button being present.
* Upgrade to the latest version simply `docker restart transmission`.
* To monitor the logs of the container in realtime `docker logs -f transmission`.
## Securing the webui with a username/password.
this requires 3 settings to be changed in the settings.json file.
`Make sure the container is stopped before editing these settings.`
`"rpc-authentication-required": true,` - check this, the default is false, change to true.
`"rpc-username": "transmission",` substitute transmission for your chosen user name, this is just an example.
`rpc-password` will be a hash starting with {, replace everything including the { with your chosen password, keeping the quotes.
Transmission will convert it to a hash when you restart the container after making the above edits.
## Updating Blocklists Automatically
This requires `"blocklist-enabled": true,` to be set. By setting this to true, it is assumed you have also populated `blocklist-url` with a valid block list.
The automatic update is a shell script that downloads a blocklist from the url stored in the settings.json, gunzips it, and restarts the transmission daemon.
The automatic update will run once a day at 3am local server time.
## Support Info
* Shell access whilst the container is running: `docker exec -it transmission /bin/bash`
* To monitor the logs of the container in realtime: `docker logs -f transmission`
* container version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' transmission`
* image version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/transmission`
## Updating Info
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Below are the instructions for updating containers:
### Via Docker Run/Create
* Update the image: `docker pull linuxserver/transmission`
* Stop the running container: `docker stop transmission`
* Delete the container: `docker rm transmission`
* Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
* Start the new container: `docker start transmission`
* You can also remove the old dangling images: `docker image prune`
### Via Docker Compose
* Update all images: `docker-compose pull`
* or update a single image: `docker-compose pull transmission`
* Let compose update all containers as necessary: `docker-compose up -d`
* or update a single container: `docker-compose up -d transmission`
* You can also remove the old dangling images: `docker image prune`
### Via Watchtower auto-updater (especially useful if you don't remember the original parameters)
* Pull the latest image at its tag and replace it with the same env variables in one run:
```
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--run-once transmission
```
* You can also remove the old dangling images: `docker image prune`
## Building locally
If you want to make local modifications to these images for development purposes or just to customize the logic:
```
git clone https://github.com/linuxserver/docker-transmission.git
cd docker-transmission
docker build \
--no-cache \
--pull \
-t linuxserver/transmission:latest .
```
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
```
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
## Versions
+ **06.12.2015:** Separate mapping for watch folder.
+ **16.11.2015:** Initial Release.
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
* **22.02.19:** - Rebase to Alpine 3.9, add themes to baseimage, add python and findutils.
* **22.02.19:** - Catch term and clean exit.
* **07.02.19:** - Add pipeline logic and multi arch.
* **15.08.18:** - Rebase to alpine linux 3.8.
* **12.02.18:** - Pull transmission from edge repo.
* **10.01.18:** - Rebase to alpine linux 3.7.
* **25.07.17:** - Add rsync package.
* **27.05.17:** - Rebase to alpine linux 3.6.
* **06.02.17:** - Rebase to alpine linux 3.5.
* **15.01.17:** - Add p7zip, tar , unrar and unzip packages.
* **16.10.16:** - Blocklist autoupdate with optional authentication.
* **14.10.16:** - Add version layer informationE.
* **23.09.16:** - Add information about securing the webui to README.
* **21.09.16:** - Add curl package.
* **09.09.16:** - Add layer badges to README.
* **28.08.16:** - Add badges to README.
* **09.08.16:** - Rebase to alpine linux.
* **06.12.15:** - Separate mapping for watch folder.
* **16.11.15:** - Initial Release.

View File

@@ -1,7 +0,0 @@
#!/bin/bash
mkdir -p /downloads/{complete,incomplete} /watch
[[ ! -f /config/settings.json ]] && cp /defaults/settings.json /config/settings.json
chown abc:abc /watch /config/settings.json /downloads /downloads/incomplete /downloads/complete

27
jenkins-vars.yml Normal file
View File

@@ -0,0 +1,27 @@
---
# jenkins variables
project_name: docker-transmission
external_type: na
custom_version_command: "curl -s http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/ |awk -F '(transmission-cli-|.apk)' '/transmission-cli.*.apk/ {print $2}'"
release_type: stable
release_tag: latest
ls_branch: master
repo_vars:
- BUILD_VERSION_ARG = 'TRANSMISSION_VERSION'
- LS_USER = 'linuxserver'
- LS_REPO = 'docker-transmission'
- CONTAINER_NAME = 'transmission'
- DOCKERHUB_IMAGE = 'linuxserver/transmission'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/transmission'
- PR_DOCKERHUB_IMAGE = 'lspipepr/transmission'
- DIST_IMAGE = 'alpine'
- MULTIARCH='true'
- CI='true'
- CI_WEB='true'
- CI_PORT='9091'
- CI_SSL='false'
- CI_DELAY='120'
- CI_DOCKERENV='TZ=US/Pacific'
- CI_AUTH='user:password'
- CI_WEBPATH=''

54
package_versions.txt Executable file
View File

@@ -0,0 +1,54 @@
alpine-baselayout-3.1.0-r3
alpine-keys-2.1-r1
apk-tools-2.10.3-r1
bash-4.4.19-r1
busybox-1.29.3-r10
ca-certificates-20190108-r0
ca-certificates-cacert-20190108-r0
coreutils-8.30-r0
curl-7.64.0-r1
expat-2.2.6-r0
findutils-4.6.0-r1
gdbm-1.13-r1
jq-1.6-r0
libacl-2.2.52-r5
libattr-2.4.47-r7
libbz2-1.0.6-r6
libc-utils-0.7.1-r0
libcrypto1.1-1.1.1b-r1
libcurl-7.64.0-r1
libevent-2.1.8-r6
libffi-3.2.1-r6
libgcc-8.3.0-r0
libintl-0.19.8.1-r4
libssh2-1.8.2-r0
libssl1.1-1.1.1b-r1
libstdc++-8.3.0-r0
libtls-standalone-2.7.4-r6
linux-pam-1.3.0-r0
musl-1.1.20-r4
musl-utils-1.1.20-r4
ncurses-libs-6.1_p20190105-r0
ncurses-terminfo-6.1_p20190105-r0
ncurses-terminfo-base-6.1_p20190105-r0
nghttp2-libs-1.35.1-r0
oniguruma-6.9.1-r0
openssl-1.1.1b-r1
p7zip-16.02-r3
popt-1.16-r7
python2-2.7.16-r1
readline-7.0.003-r1
rsync-3.1.3-r1
scanelf-1.2.3-r0
shadow-4.5-r0
sqlite-libs-3.26.0-r3
ssl_client-1.29.3-r10
tar-1.32-r0
transmission-cli-2.94-r1
transmission-daemon-2.94-r1
tzdata-2019a-r0
unrar-5.6.8-r0
unzip-6.0-r4
xz-5.2.4-r0
xz-libs-5.2.4-r0
zlib-1.2.11-r1

104
readme-vars.yml Normal file
View File

@@ -0,0 +1,104 @@
---
# project information
project_name: transmission
project_url: "https://www.transmissionbt.com/"
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/transmission.png"
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is designed for easy, powerful use. Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, µTP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more."
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
project_blurb_optional_extras_enabled: false
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
# development version
development_versions: false
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_net: false
param_usage_include_env: true
param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "<path to data>", desc: "Where transmission should store config files and logs." }
- { vol_path: "/downloads", vol_host_path: "<path to downloads>", desc: "Local path for downloads." }
- { vol_path: "/watch", vol_host_path: "<path to watch folder>", desc: "Watch folder for torrent files." }
param_usage_include_ports: true
param_ports:
- { external_port: "9091", internal_port: "9091", port_desc: "WebUI" }
- { external_port: "51413", internal_port: "51413", port_desc: "Torrent Port TCP" }
- { external_port: "51413", internal_port: "51413/udp", port_desc: "Torrent Port UDP" }
param_device_map: false
cap_add_param: false
# optional container parameters
opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "TRANSMISSION_WEB_HOME", env_value: "/combustion-release/", desc: "Specify an alternative UI options are `/combustion-release/` and `/transmission-web-control/`." }
opt_param_usage_include_vols: false
opt_param_usage_include_ports: false
opt_param_device_map: false
opt_cap_add_param: false
optional_block_1: false
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Webui is on port 9091, the settings.json file in /config has extra settings not available in the webui. Stop the container before editing it or any changes won't be saved.
For users pulling an update and unable to access the webui setting you may need to set "rpc-host-whitelist-enabled": false, in /config/settings.json`
If you choose to use transmission-web-control as your default UI, just note that the origional Web UI will not be available to you despite the button being present.
## Securing the webui with a username/password.
this requires 3 settings to be changed in the settings.json file.
`Make sure the container is stopped before editing these settings.`
`"rpc-authentication-required": true,` - check this, the default is false, change to true.
`"rpc-username": "transmission",` substitute transmission for your chosen user name, this is just an example.
`rpc-password` will be a hash starting with {, replace everything including the { with your chosen password, keeping the quotes.
Transmission will convert it to a hash when you restart the container after making the above edits.
## Updating Blocklists Automatically
This requires `"blocklist-enabled": true,` to be set. By setting this to true, it is assumed you have also populated `blocklist-url` with a valid block list.
The automatic update is a shell script that downloads a blocklist from the url stored in the settings.json, gunzips it, and restarts the transmission daemon.
The automatic update will run once a day at 3am local server time.
# changelog
changelogs:
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
- { date: "22.02.19:", desc: "Rebase to Alpine 3.9, add themes to baseimage, add python and findutils." }
- { date: "22.02.19:", desc: "Catch term and clean exit." }
- { date: "07.02.19:", desc: "Add pipeline logic and multi arch." }
- { date: "15.08.18:", desc: "Rebase to alpine linux 3.8." }
- { date: "12.02.18:", desc: "Pull transmission from edge repo." }
- { date: "10.01.18:", desc: "Rebase to alpine linux 3.7." }
- { date: "25.07.17:", desc: "Add rsync package." }
- { date: "27.05.17:", desc: "Rebase to alpine linux 3.6." }
- { date: "06.02.17:", desc: "Rebase to alpine linux 3.5." }
- { date: "15.01.17:", desc: "Add p7zip, tar , unrar and unzip packages." }
- { date: "16.10.16:", desc: "Blocklist autoupdate with optional authentication." }
- { date: "14.10.16:", desc: "Add version layer informationE." }
- { date: "23.09.16:", desc: "Add information about securing the webui to README." }
- { date: "21.09.16:", desc: "Add curl package." }
- { date: "09.09.16:", desc: "Add layer badges to README." }
- { date: "28.08.16:", desc: "Add badges to README." }
- { date: "09.08.16:", desc: "Rebase to alpine linux." }
- { date: "06.12.15:", desc: "Separate mapping for watch folder." }
- { date: "16.11.15:", desc: "Initial Release." }

View File

@@ -0,0 +1,20 @@
#!/usr/bin/with-contenv bash
BLOCKLIST_ENABLED=`jq -r '.["blocklist-enabled"]' /config/settings.json`
BLOCKLIST_URL=`jq -r '.["blocklist-url"]' /config/settings.json | sed 's/\&amp;/\&/g'`
if [ $BLOCKLIST_ENABLED == true ]; then
mkdir -p /tmp/blocklists
rm -rf /tmp/blocklists/*
cd /tmp/blocklists
wget -q -O blocklist.gz "$BLOCKLIST_URL"
if [ $? == 0 ]; then
gunzip *.gz
if [ $? == 0 ]; then
chmod go+r *
rm -rf /config/blocklists/*
cp /tmp/blocklists/* /config/blocklists
s6-svc -h /var/run/s6/services/transmission
fi
fi
fi

View File

@@ -0,0 +1,24 @@
#!/usr/bin/with-contenv bash
# make folders
mkdir -p \
/downloads/{complete,incomplete} /watch
# copy config
[[ ! -f /config/settings.json ]] && cp \
/defaults/settings.json /config/settings.json
# copy blocklist-update script
[[ ! -f /config/blocklist-update.sh ]] && cp \
/defaults/blocklist-update.sh /config/blocklist-update.sh
# permissions
chown abc:abc \
/config/settings.json \
/config/blocklist-update.sh \
/downloads \
/downloads/complete \
/downloads/incomplete \
/watch
chmod 755 /config/blocklist-update.sh

10
root/etc/crontabs/root Normal file
View File

@@ -0,0 +1,10 @@
# do daily/weekly/monthly maintenance
# min hour day month weekday command
*/15 * * * * run-parts /etc/periodic/15min
0 * * * * run-parts /etc/periodic/hourly
0 2 * * * run-parts /etc/periodic/daily
0 3 * * 6 run-parts /etc/periodic/weekly
0 5 1 * * run-parts /etc/periodic/monthly
# run daily blocklist update
0 3 * * * /config/blocklist-update.sh 2>&1

View File

@@ -0,0 +1,4 @@
#!/usr/bin/with-contenv bash
exec \
/usr/sbin/crond -f -S -l 0 -c /etc/crontabs

View File

@@ -0,0 +1,13 @@
#!/usr/bin/with-contenv bash
_term() {
echo "Caught SIGTERM signal!"
/usr/bin/transmission-remote --exit
}
trap _term SIGTERM
s6-setuidgid abc /usr/bin/transmission-daemon \
-g /config -c /watch -f &
wait

View File

@@ -1,3 +0,0 @@
#!/bin/bash
/sbin/setuser abc /usr/bin/transmission-daemon -g /config -c /watch -f