Compare commits

...

84 Commits

Author SHA1 Message Date
LinuxServer-CI
4f251c4f7c Bot Updating Package Versions 2019-02-24 01:04:03 -05:00
LinuxServer-CI
ca39143c95 Bot Updating Templated Files 2019-02-24 00:55:11 -05:00
aptalca
0ca99bae7d Merge pull request #37 from linuxserver/master-3.9
Rebasing to Alpine 3.9
2019-02-24 00:54:24 -05:00
thelamer
6c4da80342 Rebasing to Alpine 3.9 2019-02-22 17:23:36 -08:00
LinuxServer-CI
04fe5275d9 Bot Updating Package Versions 2019-02-22 20:02:31 -05:00
LinuxServer-CI
9b7d2285b7 Bot Updating Package Versions 2019-02-09 00:59:37 +00:00
LinuxServer-CI
3bfdf1b530 Bot Updating Templated Files 2019-02-09 00:54:33 +00:00
chbmb
51ba5af37b Merge pull request #32 from linuxserver/readme
add development tag info
2019-01-30 22:53:35 +00:00
LinuxServer-CI
019d4d7a62 Bot Updating Package Versions 2019-01-29 12:54:18 +00:00
LinuxServer-CI
85b139e67f Bot Updating Package Versions 2019-01-22 12:51:33 +00:00
aptalca
0fff1e5453 add development tag info 2019-01-16 13:52:40 -05:00
Alex Phillips
ae66ea597c Merge pull request #30 from linuxserver/appkey
generate app key on new install
2019-01-16 13:29:59 -05:00
aptalca
273c4f86e9 fix changelog date 2019-01-16 12:31:40 -05:00
LinuxServer-CI
ff93e822b2 Bot Updating Package Versions 2019-01-15 12:52:49 +00:00
LinuxServer-CI
60ebf428bb Bot Updating Templated Files 2019-01-15 07:49:00 -05:00
LinuxServer-CI
f3f5231a66 Bot Updating Package Versions 2019-01-08 12:54:17 +00:00
LinuxServer-CI
bcb72552cf Bot Updating Templated Files 2019-01-08 12:49:57 +00:00
aptalca
85afafa585 generate app key on new install 2019-01-04 15:36:03 +00:00
LinuxServer-CI
6b7de48dbf Bot Updating Package Versions 2019-01-01 12:52:53 +00:00
LinuxServer-CI
aedecabd37 Bot Updating Templated Files 2019-01-01 12:48:48 +00:00
LinuxServer-CI
1d9a9b84b1 Bot Updating Package Versions 2018-12-22 00:55:21 +00:00
LinuxServer-CI
08ef032b3c Bot Updating Templated Files 2018-12-22 00:50:42 +00:00
LinuxServer-CI
64a7009f83 Bot Updating Package Versions 2018-12-11 12:53:16 +00:00
LinuxServer-CI
90e8c4c608 Bot Updating Templated Files 2018-12-11 12:49:12 +00:00
LinuxServer-CI
84a05313d9 Bot Updating Templated Files 2018-12-04 12:49:03 +00:00
LinuxServer-CI
7f8b28e490 Bot Updating Templated Files 2018-12-04 10:47:27 +00:00
j0nnymoe
f7ac22decf Merge pull request #24 from thelamer/master
adding build logic templating to repository on development
2018-12-04 10:46:45 +00:00
thelamer
e41f0eb794 adding build logic templating to repository on development 2018-12-03 20:24:38 -08:00
LinuxServer-CI
d25b2b563e Bot Updating Package Versions 2018-11-27 12:52:09 +00:00
LinuxServer-CI
59fdc51086 Bot Updating README from template 2018-11-20 18:23:08 +00:00
Homer
a703cb7e13 Merge pull request #23 from linuxserver/aptalca-patch-1
Update Jenkinsfile
2018-11-20 18:14:45 +00:00
aptalca
6b4d8c8f85 Update Jenkinsfile 2018-11-20 13:13:17 -05:00
Homer
7dba595954 Merge pull request #22 from linuxserver/nginx
upgrade baseimage packages during build
2018-11-20 17:57:01 +00:00
aptalca
a87dcde2cd upgrade baseimage packages during build 2018-11-20 12:21:17 -05:00
LinuxServer-CI
082195f95e Bot Updating Package Versions 2018-11-10 18:26:59 +00:00
LinuxServer-CI
d7f12610c6 Bot Updating Package Versions 2018-11-06 15:23:50 +00:00
aptalca
d733b73d4c Merge pull request #21 from KodeStar/master
Update 50-config
2018-11-05 10:10:41 -05:00
KodeStar
c707b2d071 Update 50-config 2018-11-05 15:01:46 +00:00
aptalca
cdb341b0e0 Merge pull request #20 from KodeStar/master
Add missing folder to mkdir
2018-11-05 09:16:14 -05:00
KodeStar
965642e618 Add missing folder to mkdir 2018-11-05 14:05:26 +00:00
j0nnymoe
c379a17320 Merge pull request #19 from KodeStar/patch-2
Symlink SupportedApps to the config folder
2018-11-05 12:34:37 +00:00
KodeStar
a39112cc00 Symlink SupportedApps to the config folder 2018-11-05 12:14:21 +00:00
saarg
f9f40751fb Merge pull request #18 from linuxserver/zip
Add php7-zip
2018-11-05 07:37:20 +01:00
aptalca
c339f6a055 fix formatting 2018-11-04 22:07:01 -05:00
aptalca
8c52faae78 add php7-zip 2018-11-04 18:26:08 -05:00
LinuxServer-CI
9e78392b5f Bot Updating Package Versions 2018-11-04 22:02:57 +00:00
j0nnymoe
722ce4ad2a Merge pull request #17 from KodeStar/patch-1
add php7-zip
2018-11-04 21:54:01 +00:00
KodeStar
b6eba9fa1c add php7-zip 2018-11-04 21:36:07 +00:00
LinuxServer-CI
17a95129e0 Bot Updating Package Versions 2018-11-03 04:50:01 +00:00
LinuxServer-CI
a531ca2e62 Bot Updating Package Versions 2018-11-02 21:49:35 +00:00
j0nnymoe
561ba7ff5d Merge pull request #15 from thelamer/master
adding updated build logic for package tagging to repo
2018-11-02 21:46:09 +00:00
thelamer
8deb667283 adding updated build logic for package tagging to repo 2018-11-02 00:28:03 -07:00
aptalca
0eb310aa07 Merge pull request #14 from linuxserver/queue
Add queue service
2018-11-01 16:32:54 -04:00
aptalca
536409cf5f set queue driver to database 2018-10-31 18:32:55 -04:00
aptalca
3f642a6dc8 update readme 2018-10-31 20:47:03 +00:00
aptalca
270d9753f7 add queue service 2018-10-31 16:36:17 -04:00
aptalca
b0ee245e54 Merge pull request #13 from linuxserver/avatars
Symlink avatars folder
2018-10-17 17:18:35 -04:00
Alex Kretzschmar
6e17ad1836 Merge pull request #12 from linuxserver/fastcgi
Update fastcgi_params for user login support
2018-10-16 13:53:24 -04:00
aptalca
db4c2697b6 Symlink avatars folder 2018-10-13 14:50:22 +00:00
aptalca
8a288bbef9 add comment 2018-10-13 11:51:51 +00:00
aptalca
a310917220 Update fastcgi_params for user login support 2018-10-13 11:30:51 +00:00
chbmb
7be5c43f83 Merge pull request #11 from linuxserver/symlink
Symlink .env rather than copy
2018-10-07 20:33:23 +01:00
aptalca
80d7e5e8c7 Symlink .env rather than copy 2018-10-07 12:07:45 -04:00
thelamer
7c3bb91996 removing uneeded block logic for meta tagging the docker endpoints from the JenkinsFile 2018-10-05 23:14:54 -07:00
aptalca
296e912007 Merge pull request #10 from linuxserver/pipeline
Pipeline
2018-10-05 17:29:04 -04:00
thelamer
918f8595f4 missed the latest tag for the arm64 manifest tag 2018-10-05 14:09:25 -07:00
thelamer
6a66ca1514 modifying the manifest variant tagging to match other docker images 2018-10-05 13:55:08 -07:00
Ryan Kuba
570682688c Merge pull request #9 from linuxserver/pipeline
Pipeline
2018-10-05 13:32:11 -07:00
thelamer
2f45091fcb updating multi push section with correct meta tagging logic and upping testing poeriod to 2 minutes 2018-10-01 15:37:43 -07:00
thelamer
f690a07e6f need at least one docker env variable in the testing run 2018-10-01 15:15:57 -07:00
aptalca
ac9ece5ec7 update readme 2018-10-01 11:47:21 -04:00
aptalca
f83f502a6b update readme 2018-10-01 11:34:49 -04:00
aptalca
6addc89456 fix typos, update readme 2018-10-01 09:28:49 -04:00
aptalca
97aadc5cd5 Update readme-vars.yml 2018-09-30 18:38:15 -04:00
aptalca
1127f3c8c0 use heimdall release arg 2018-09-30 18:36:10 -04:00
aptalca
59cf5de1df close if 2018-09-30 18:35:43 -04:00
aptalca
7ec298119a use heimdall release arg 2018-09-30 18:35:04 -04:00
aptalca
1bf8687db0 use heimdall release arg 2018-09-30 18:33:29 -04:00
aptalca
64cfc2f9d7 Create Jenkinsfile 2018-09-30 17:48:17 -04:00
aptalca
162ac78551 sync .env 2018-09-30 17:37:22 -04:00
aptalca
22eb45277a update readme 2018-09-30 14:18:21 -04:00
aptalca
e1a96c0d42 Create readme-vars.yml 2018-09-30 14:10:15 -04:00
aptalca
03499b444a Create Dockerfile.aarch64 2018-09-30 13:47:20 -04:00
aptalca
06b761c9f0 Create Dockerfile.armhf 2018-09-30 13:43:13 -04:00
10 changed files with 1041 additions and 61 deletions

View File

@@ -1,8 +1,9 @@
FROM lsiobase/alpine.nginx:3.8
FROM lsiobase/alpine.nginx:3.9
# set version label
ARG BUILD_DATE
ARG VERSION
ARG HEIMDALL_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
@@ -10,24 +11,31 @@ LABEL maintainer="aptalca"
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \
echo "**** install runtime pacakges ****" && \
apk add --no-cache \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
curl \
nginx \
php7-ctype \
php7-pdo_sqlite \
php7-tokenizer \
php7-zip \
tar && \
echo "**** install heimdall ****" && \
mkdir -p \
/var/www/localhost/heimdall && \
HEIM_VER=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/heimdall.tar.gz -L \
"https://github.com/linuxserver/Heimdall/archive/${HEIM_VER}.tar.gz" && \
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
tar xf \
/tmp/heimdall.tar.gz -C \
/var/www/localhost/heimdall --strip-components=1 && \
echo "**** configure nginx ****" && \
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
/etc/nginx/fastcgi_params && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*

47
Dockerfile.aarch64 Normal file
View File

@@ -0,0 +1,47 @@
FROM lsiobase/alpine.nginx.arm64:3.9
# Add qemu to build on x86_64 systems
COPY qemu-aarch64-static /usr/bin
# set version label
ARG BUILD_DATE
ARG VERSION
ARG HEIMDALL_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
curl \
nginx \
php7-ctype \
php7-pdo_sqlite \
php7-tokenizer \
php7-zip \
tar && \
echo "**** install heimdall ****" && \
mkdir -p \
/var/www/localhost/heimdall && \
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/heimdall.tar.gz -L \
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
tar xf \
/tmp/heimdall.tar.gz -C \
/var/www/localhost/heimdall --strip-components=1 && \
echo "**** configure nginx ****" && \
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
/etc/nginx/fastcgi_params && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# add local files
COPY root/ /

47
Dockerfile.armhf Normal file
View File

@@ -0,0 +1,47 @@
FROM lsiobase/alpine.nginx.armhf:3.9
# Add qemu to build on x86_64 systems
COPY qemu-arm-static /usr/bin
# set version label
ARG BUILD_DATE
ARG VERSION
ARG HEIMDALL_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
curl \
nginx \
php7-ctype \
php7-pdo_sqlite \
php7-tokenizer \
php7-zip \
tar && \
echo "**** install heimdall ****" && \
mkdir -p \
/var/www/localhost/heimdall && \
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/heimdall.tar.gz -L \
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
tar xf \
/tmp/heimdall.tar.gz -C \
/var/www/localhost/heimdall --strip-components=1 && \
echo "**** configure nginx ****" && \
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
/etc/nginx/fastcgi_params && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# add local files
COPY root/ /

612
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,612 @@
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')
EXT_GIT_BRANCH = 'master'
EXT_USER = 'linuxserver'
EXT_REPO = 'Heimdall'
CONTAINER_NAME = 'heimdall'
BUILD_VERSION_ARG = 'HEIMDALL_RELEASE'
LS_USER = 'linuxserver'
LS_REPO = 'docker-heimdall'
DOCKERHUB_IMAGE = 'linuxserver/heimdall'
DEV_DOCKERHUB_IMAGE = 'lsiodev/heimdall'
PR_DOCKERHUB_IMAGE = 'lspipepr/heimdall'
DIST_IMAGE = 'alpine'
MULTIARCH='true'
CI='true'
CI_WEB='true'
CI_PORT='80'
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: '''curl -s https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/latest | jq -r '. | .tag_name' ''',
returnStdout: true).trim()
env.LS_RELEASE_NOTES = sh(
script: '''git log -1 --pretty=%B | 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 stable github release use the latest endpoint from github to determine the ext tag
stage("Set ENV github_stable"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
returnStdout: true).trim()
}
}
}
// If this is a stable or devel github release generate the link for the build message
stage("Set ENV github_link"){
steps{
script{
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
}
}
}
// 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 + '|arm32v6-' + 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 + '|arm32v6-' + 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 + '|arm32v6-' + 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/'
}
}
}
// 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 -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 -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 "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static -o qemu-arm-static"
sh "chmod +x qemu-*"
sh "docker build --no-cache -f Dockerfile.armhf -t ${IMAGE}:arm32v6-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm32v6-${META_TAG} lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}"
sh "docker push lsiodev/buildcache:arm32v6-${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 "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static -o qemu-aarch64-static"
sh "chmod +x qemu-*"
sh "docker build --no-cache -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}"
}
}
}
}
}
// 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 > packages && \
apk info -v > versions && \
paste -d " " packages versions > /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 > /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:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${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}"
}
}
}
// 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:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${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}:arm32v6-${META_TAG} ${IMAGE}:arm32v6-latest"
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-latest"
sh "docker push ${IMAGE}:amd64-${META_TAG}"
sh "docker push ${IMAGE}:arm32v6-${META_TAG}"
sh "docker push ${IMAGE}:arm64v8-${META_TAG}"
sh "docker push ${IMAGE}:amd64-latest"
sh "docker push ${IMAGE}:arm32v6-latest"
sh "docker push ${IMAGE}:arm64v8-latest"
sh "docker manifest push --purge ${IMAGE}:latest || :"
sh "docker manifest create ${IMAGE}:latest ${IMAGE}:amd64-latest ${IMAGE}:arm32v6-latest ${IMAGE}:arm64v8-latest"
sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm32v6-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}:arm32v6-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}"
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v6-${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}"
}
}
}
// 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 + '-pkg-' + env.PACKAGE_TAG + '-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}-pkg-${PACKAGE_TAG}-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}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-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
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "master",\
"name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' 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' '''
}
}
}
}
/* ######################
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**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**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} '''
}
}
}
}
}

194
README.md
View File

@@ -1,94 +1,182 @@
[linuxserverurl]: https://linuxserver.io
[forumurl]: https://forum.linuxserver.io
[ircurl]: https://www.linuxserver.io/irc/
[podcasturl]: https://www.linuxserver.io/podcast/
[appurl]: https://github.com/linuxserver/Heimdall
[hub]: https://hub.docker.com/r/linuxserver/heimdall/
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring :-
The [LinuxServer.io][linuxserverurl] team brings you another container release featuring easy user mapping and community support. Find us for support at:
* [forum.linuxserver.io][forumurl]
* [IRC][ircurl] on freenode at `#linuxserver.io`
* [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
* 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
# linuxserver/heimdall
[![](https://images.microbadger.com/badges/version/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own version badge on microbadger.com")[![](https://images.microbadger.com/badges/image/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own image badge on microbadger.com")[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/heimdall.svg)][hub][![Docker Stars](https://img.shields.io/docker/stars/linuxserver/heimdall.svg)][hub][![Build Status](https://ci.linuxserver.io/buildStatus/icon?job=Docker-Builders/x86-64/x86-64-heimdall)](https://ci.linuxserver.io/job/Docker-Builders/job/x86-64/job/x86-64-heimdall/)
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!
* [Podcast](https://anchor.fm/linuxserverio) - on hiatus. Coming back soon (late 2018).
Heimdall is a way to organise all those links to your most used web sites and web applications in a simple way.
# PSA: Changes are happening
From August 2018 onwards, Linuxserver are in the midst of switching to a new CI platform which will enable us to build and release multiple architectures under a single repo. To this end, existing images for `arm64` and `armhf` builds are being deprecated. They are replaced by a manifest file in each container which automatically pulls the correct image for your architecture. You'll also be able to pull based on a specific architecture tag.
TLDR: Multi-arch support is changing from multiple repos to one repo per container image.
# [linuxserver/heimdall](https://github.com/linuxserver/docker-heimdall)
[![](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/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own version badge on microbadger.com")
[![](https://images.microbadger.com/badges/image/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own version badge on microbadger.com")
![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/heimdall.svg)
![Docker Stars](https://img.shields.io/docker/stars/linuxserver/heimdall.svg)
[![Build Status](https://ci.linuxserver.io/buildStatus/icon?job=Docker-Pipeline-Builders/docker-heimdall/master)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-heimdall/job/master/)
[![](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/heimdall/latest/badge.svg)](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/heimdall/latest/index.html)
[Heimdall](https://heimdall.site) is a way to organise all those links to your most used web sites and web applications in a simple way.
Simplicity is the key to Heimdall.
Why not use it as your browser start page? It even has the ability to include a search bar using either Google, Bing or DuckDuckGo.
[![heimdall](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/heimdall-banner.png)][appurl]
[![heimdall](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/heimdall-banner.png)](https://heimdall.site)
## 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).
Simply pulling `linuxserver/heimdall` 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 | arm32v6-latest |
## Usage
Here are some example snippets to help you get started creating a container.
### docker
```
docker create \
--name=heimdall \
-v <path to data>:/config \
-e PGID=<gid> -e PUID=<uid> \
-p 80:80 -p 443:443 \
-e TZ=<timezone> \
linuxserver/heimdall
--name=heimdall \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/London \
-p 80:80 \
-p 443:443 \
-v </path/to/appdata/config>:/config \
--restart unless-stopped \
linuxserver/heimdall
```
Using tags, you can switch between the stable releases of Heimdall and the master branch. No tag is required for the latest stable release.
Add the `development` tag, if required, to the `linuxserver/heimdall` line of the run/create command in the following format, `linuxserver/heimdall:development`.
The `development` tag will be the latest commit in the master branch of Heimdall.
HOWEVER, USE THE DEVELOPMENT TAG AT YOUR OWN PERIL !!!!!!!!!
### docker-compose
Compatible with docker-compose v2 schemas.
```
---
version: "2"
services:
heimdall:
image: linuxserver/heimdall
container_name: heimdall
environment:
- PUID=1001
- PGID=1001
- TZ=Europe/London
volumes:
- </path/to/appdata/config>:/config
ports:
- 80:80
- 443:443
mem_limit: 4096m
restart: unless-stopped
```
## Parameters
`The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.
For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container.
So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080
http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.`
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.
| Parameter | Function |
| :----: | --- |
| `-p 80` | http gui |
| `-p 443` | https gui |
| `-e PUID=1001` | for UserID - see below for explanation |
| `-e PGID=1001` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
| `-v /config` | Contains all relevant configuration files. |
* `-p 80` - The web-services.
* `-p 443` - The SSL-Based Webservice
* `-v /config` - Contains your www content and all relevant configuration files.
* `-e PGID` for GroupID - see below for explanation
* `-e PUID` for UserID - see below for explanation
* `-e TZ` - timezone ie. `America/New_York`
## User / Group Identifiers
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it heimdall /bin/bash`.
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`.
### User / Group Identifiers
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
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" ™.
In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below:
In this instance `PUID=1001` and `PGID=1001`, to find yours use `id user` as below:
```
$ id <dockeruser>
$ id username
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
```
## Setting up the application
&nbsp;
## Application Setup
Access the web gui at http://SERVERIP:PORT
## Adding password protection
### Adding password protection
This image now supports password protection through htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it heimdall htpasswd -c /config/nginx/.htpasswd <username>`. Replace <username> with a username of your choice and you will be asked to enter a password. New installs will automatically pick it up and implement password protected access. Existing users updating their image can delete their site config at `/config/nginx/site-confs/default` and restart the container after updating the image. A new site config with htpasswd support will be created in its place.
## Info
* To monitor the logs of the container in realtime `docker logs -f heimdall`.
## Support Info
* Shell access whilst the container is running: `docker exec -it heimdall /bin/bash`
* To monitor the logs of the container in realtime: `docker logs -f heimdall`
* container version number
`docker inspect -f '{{ index .Config.Labels "build_version" }}' heimdall`
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' heimdall`
* image version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/heimdall`
`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/heimdall`
## 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/heimdall`
* Stop the running container: `docker stop heimdall`
* Delete the container: `docker rm heimdall`
* 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 heimdall`
* You can also remove the old dangling images: `docker image prune`
### Via Docker Compose
* Update the image: `docker-compose pull linuxserver/heimdall`
* Let compose update containers as necessary: `docker-compose up -d`
* You can also remove the old dangling images: `docker image prune`
## Versions
+ **05.09.18:** Rebase to alpine linux 3.8.
+ **06.03.18:** Use password protection if htpasswd is set.
Existing users can delete their default site config at /config/nginx/site-confs/default
and restart the container, a new default site config with htpasswd support will be created in its place
+ **12.02.18:** Initial Release.
* **22.02.19:** - Rebasing to alpine 3.9.
* **16.01.18:** - Generate random app key in .env for new installs.
* **20.11.18:** - Upgrade baseimage packages during build.
* **04.11.18:** - Add php7-zip.
* **31.10.18:** - Add queue service.
* **17.10.18:** - Symlink avatars folder.
* **16.10.18:** - Updated fastcgi_params for user login support.
* **07.10.18:** - Symlink `.env` rather than copy. It now resides under `/config/www`
* **30.09.18:** - Multi-arch image. Move `.env` to `/config`.
* **05.09.18:** - Rebase to alpine linux 3.8.
* **06.03.18:** - Use password protection if htpasswd is set. Existing users can delete their default site config at /config/nginx/site-confs/default and restart the container, a new default site config with htpasswd support will be created in its place
* **12.02.18:** - Initial Release.

29
jenkins-vars.yml Normal file
View File

@@ -0,0 +1,29 @@
---
# jenkins variables
project_name: docker-heimdall
external_type: github_stable
release_type: stable
release_tag: latest
ls_branch: master
repo_vars:
- EXT_GIT_BRANCH = 'master'
- EXT_USER = 'linuxserver'
- EXT_REPO = 'Heimdall'
- CONTAINER_NAME = 'heimdall'
- BUILD_VERSION_ARG = 'HEIMDALL_RELEASE'
- LS_USER = 'linuxserver'
- LS_REPO = 'docker-heimdall'
- DOCKERHUB_IMAGE = 'linuxserver/heimdall'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/heimdall'
- PR_DOCKERHUB_IMAGE = 'lspipepr/heimdall'
- DIST_IMAGE = 'alpine'
- MULTIARCH='true'
- CI='true'
- CI_WEB='true'
- CI_PORT='80'
- CI_SSL='false'
- CI_DELAY='120'
- CI_DOCKERENV='TZ=US/Pacific'
- CI_AUTH='user:password'
- CI_WEBPATH=''

69
package_versions.txt Normal file
View File

@@ -0,0 +1,69 @@
musl musl-1.1.20-r3
busybox busybox-1.29.3-r10
alpine-baselayout alpine-baselayout-3.1.0-r3
alpine-keys alpine-keys-2.1-r1
libcrypto1.1 libcrypto1.1-1.1.1a-r1
libssl1.1 libssl1.1-1.1.1a-r1
ca-certificates-cacert ca-certificates-cacert-20190108-r0
libtls-standalone libtls-standalone-2.7.4-r6
ssl_client ssl_client-1.29.3-r10
zlib zlib-1.2.11-r1
apk-tools apk-tools-2.10.3-r1
scanelf scanelf-1.2.3-r0
musl-utils musl-utils-1.1.20-r3
libc-utils libc-utils-0.7.1-r0
xz-libs xz-libs-5.2.4-r0
xz xz-5.2.4-r0
ca-certificates ca-certificates-20190108-r0
ncurses-terminfo-base ncurses-terminfo-base-6.1_p20190105-r0
ncurses-terminfo ncurses-terminfo-6.1_p20190105-r0
ncurses-libs ncurses-libs-6.1_p20190105-r0
readline readline-7.0.003-r1
bash bash-4.4.19-r1
libattr libattr-2.4.47-r7
libacl libacl-2.2.52-r5
coreutils coreutils-8.30-r0
linux-pam linux-pam-1.3.0-r0
shadow shadow-4.5-r0
tzdata tzdata-2018i-r0
libuuid libuuid-2.33-r0
apr apr-1.6.5-r0
expat expat-2.2.6-r0
apr-util apr-util-1.6.1-r5
apache2-utils apache2-utils-2.4.38-r2
nghttp2-libs nghttp2-libs-1.35.1-r0
libssh2 libssh2-1.8.0-r4
libcurl libcurl-7.63.0-r0
pcre2 pcre2-10.32-r1
git git-2.20.1-r0
libressl2.7-libcrypto libressl2.7-libcrypto-2.7.4-r2
libressl2.7-libssl libressl2.7-libssl-2.7.4-r2
popt popt-1.16-r7
logrotate logrotate-3.15.0-r0
libmagic libmagic-5.35-r0
nano nano-3.2-r0
pcre pcre-8.42-r1
nginx nginx-1.14.2-r0
openssl openssl-1.1.1a-r1
php7-common php7-common-7.2.14-r0
libedit libedit-20181209.3.1-r0
libxml2 libxml2-2.9.9-r0
php7 php7-7.2.14-r0
php7-fileinfo php7-fileinfo-7.2.14-r0
php7-fpm php7-fpm-7.2.14-r0
php7-json php7-json-7.2.14-r0
php7-mbstring php7-mbstring-7.2.14-r0
php7-openssl php7-openssl-7.2.14-r0
php7-session php7-session-7.2.14-r0
php7-simplexml php7-simplexml-7.2.14-r0
php7-xml php7-xml-7.2.14-r0
php7-xmlwriter php7-xmlwriter-7.2.14-r0
curl curl-7.63.0-r0
php7-ctype php7-ctype-7.2.14-r0
php7-pdo php7-pdo-7.2.14-r0
sqlite-libs sqlite-libs-3.26.0-r3
php7-pdo_sqlite php7-pdo_sqlite-7.2.14-r0
php7-tokenizer php7-tokenizer-7.2.14-r0
libzip libzip-1.5.1-r2
php7-zip php7-zip-7.2.14-r0
tar tar-1.31-r0

66
readme-vars.yml Normal file
View File

@@ -0,0 +1,66 @@
---
# project information
project_name: heimdall
project_url: "https://heimdall.site"
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/heimdall-banner.png"
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a way to organise all those links to your most used web sites and web applications in a simple way.
Simplicity is the key to Heimdall.
Why not use it as your browser start page? It even has the ability to include a search bar using either Google, Bing or DuckDuckGo."
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- { arch: "{{ arch_armhf }}", tag: "arm32v6-latest"}
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Contains all relevant configuration files." }
param_usage_include_ports: true
param_ports:
- { external_port: "80", internal_port: "80", port_desc: "http gui" }
- { external_port: "443", internal_port: "443", port_desc: "https gui" }
param_usage_include_env: true
param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
# optional parameters
optional_block_1: true
optional_block_1_items:
- |
Using tags, you can switch between the stable releases of Heimdall and the master branch. No tag is required for the latest stable release.
Add the `development` tag, if required, to the `linuxserver/heimdall` line of the run/create command in the following format, `linuxserver/heimdall:development`.
The `development` tag will be the latest commit in the master branch of Heimdall.
HOWEVER, USE THE DEVELOPMENT TAG AT YOUR OWN PERIL !!!!!!!!!
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Access the web gui at http://SERVERIP:PORT
### Adding password protection
This image now supports password protection through htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it heimdall htpasswd -c /config/nginx/.htpasswd <username>`. Replace <username> with a username of your choice and you will be asked to enter a password. New installs will automatically pick it up and implement password protected access. Existing users updating their image can delete their site config at `/config/nginx/site-confs/default` and restart the container after updating the image. A new site config with htpasswd support will be created in its place.
# changelog
changelogs:
- { date: "22.02.19:", desc: "Rebasing to alpine 3.9." }
- { date: "16.01.18:", desc: "Generate random app key in .env for new installs." }
- { date: "20.11.18:", desc: "Upgrade baseimage packages during build." }
- { date: "04.11.18:", desc: "Add php7-zip." }
- { date: "31.10.18:", desc: "Add queue service." }
- { date: "17.10.18:", desc: "Symlink avatars folder." }
- { date: "16.10.18:", desc: "Updated fastcgi_params for user login support." }
- { date: "07.10.18:", desc: "Symlink `.env` rather than copy. It now resides under `/config/www`" }
- { date: "30.09.18:", desc: "Multi-arch image. Move `.env` to `/config`." }
- { date: "05.09.18:", desc: "Rebase to alpine linux 3.8." }
- { date: "06.03.18:", desc: "Use password protection if htpasswd is set. Existing users can delete their default site config at /config/nginx/site-confs/default and restart the container, a new default site config with htpasswd support will be created in its place" }
- { date: "12.02.18:", desc: "Initial Release." }

View File

@@ -2,14 +2,17 @@
# make our folders
mkdir -p \
/config/www/{backgrounds,icons}
/config/www/{backgrounds,icons,avatars,SupportedApps}
# create symlinks
symlinks=( \
/var/www/localhost/heimdall/storage/app/public/avatars \
/var/www/localhost/heimdall/storage/app/public/backgrounds \
/var/www/localhost/heimdall/storage/app/public/icons \
/var/www/localhost/heimdall/database/app.sqlite )
/var/www/localhost/heimdall/app/SupportedApps \
/var/www/localhost/heimdall/database/app.sqlite \
/var/www/localhost/heimdall/.env )
for i in "${symlinks[@]}"
do
@@ -17,6 +20,13 @@ do
[[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i"
done
# copy .env if not exists
[[ ! -f /config/www/.env ]] && \
cp /var/www/localhost/heimdall/.env.example /config/www/.env && \
php /var/www/localhost/heimdall/artisan key:generate
# set queue driver to database
sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env
# permissions
chown -R abc:abc \
/config \

View File

@@ -0,0 +1,4 @@
#!/usr/bin/with-contenv bash
exec \
s6-setuidgid abc php /var/www/localhost/heimdall/artisan queue:work database --sleep=3 --tries=3